Repository navigation
Conversation
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: e4ef4ea814
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| except Exception: | ||
| _restore_patch_target(snapshot) |
There was a problem hiding this comment.
Restore the Git index when rolling back a failed commit
If GitAudit.commit_paths() fails after its git add step (for example, because a commit hook rejects the commit), this handler restores only the working-tree file. The patched content remains staged in the Git index, so a later unrelated audit commit can silently commit the failed or still-pending patch. The rollback needs to restore both the target file and its prior index state.
Useful? React with 👍 / 👎.
|
⏰ GitWire Stale Warning This pr has had no activity for 23 days. To keep it open, leave a comment or push an update. |
|
🔒 GitWire Auto-Close: Stale pr This pr has had no activity for 30 days and has been automatically closed. If this was closed in error, leave a comment and a maintainer can reopen it. |
Summary
Adds a restore guard for patch application consistency.
Changes
Closes #64.
Validation
CI should run on this PR.