mirror of
https://github.com/hanzoai/dev.git
synced 2026-10-25 03:32:32 +00:00
Add description, license, and repository fields required for publishing to crates.io.
codex-git-tooling
Helpers for interacting with git, primarily used by Code to capture and restore workspace snapshots.
use std::path::Path;
use code_git_tooling::{create_ghost_commit, restore_ghost_commit, CreateGhostCommitOptions};
let repo = Path::new("/path/to/repo");
// Capture the current working tree as an unreferenced commit.
let ghost = create_ghost_commit(&CreateGhostCommitOptions::new(repo))?;
// Later, undo back to that state.
restore_ghost_commit(repo, &ghost)?;
Pass a custom message with .message("…") or force-include ignored files with
.force_include(["ignored.log".into()]).