Require verification after git commit execution
- update the git guide to require post-commit verification before reporting success - document that commit verification must confirm git commit exited successfully, HEAD advanced, and the new commit appears in git log - document that failed or non-created commits must be reported clearly instead of being claimed as successful
This commit is contained in:
@@ -25,6 +25,13 @@ This file records repo-specific git workflow preferences for `/home/aw/code/cds`
|
|||||||
- Do not treat a request such as "give me the git commit" or "make the commit" as approval by itself.
|
- Do not treat a request such as "give me the git commit" or "make the commit" as approval by itself.
|
||||||
- Only execute `git commit` after the user explicitly approves the displayed commit command.
|
- Only execute `git commit` after the user explicitly approves the displayed commit command.
|
||||||
- If the user changes the requested commit message or scope after commands are shown, rebuild the proposal and wait for fresh approval.
|
- If the user changes the requested commit message or scope after commands are shown, rebuild the proposal and wait for fresh approval.
|
||||||
|
- After executing `git commit`, always verify that the commit actually succeeded before reporting success.
|
||||||
|
- Verification must include checking that:
|
||||||
|
- `git commit` exited successfully
|
||||||
|
- `HEAD` advanced to a new commit
|
||||||
|
- the new commit appears in `git log --oneline -n 1`
|
||||||
|
- Do not claim a commit was created unless that verification has been completed.
|
||||||
|
- If `git commit` did not actually create a commit, report that clearly and leave the changes as uncommitted.
|
||||||
|
|
||||||
## Push Requests
|
## Push Requests
|
||||||
- When the user asks to push, use `git push -u origin main` by default unless the user explicitly asks for a different remote or branch.
|
- When the user asks to push, use `git push -u origin main` by default unless the user explicitly asks for a different remote or branch.
|
||||||
|
|||||||
Reference in New Issue
Block a user