mirror of
https://github.com/openai/codex.git
synced 2026-04-30 17:36:40 +00:00
feat: baseline lib (#18848)
This add with 2 entry point: * `reset_git_repository` that takes a directory and set it as a new git root * `diff_since_latest_init` this returns the diff for a given directory since the last `reset_git_repository`
This commit is contained in:
@@ -1,7 +1,11 @@
|
||||
# codex-git-utils
|
||||
|
||||
Helpers for interacting with git, including patch application and worktree
|
||||
snapshot utilities.
|
||||
snapshot utilities. The crate also exposes a lightweight baseline API for
|
||||
internal directories that use git only as a resettable diff mechanism:
|
||||
`reset_git_repository` replaces `root/.git` with a fresh one-commit baseline,
|
||||
and `diff_since_latest_init` returns structured file changes plus a unified
|
||||
diff from that baseline to the current directory contents.
|
||||
|
||||
```rust,no_run
|
||||
use std::path::Path;
|
||||
|
||||
Reference in New Issue
Block a user