Skip to content

Commit 15faf1e

Browse files
altendkyrekram1-nodeHonaBrendonovichopencode-agent[bot]
authored andcommitted
fix(opencode): clarify git amend condition to require verifying commit landed (anomalyco#19937)
Co-authored-by: Aiden Cline <[email protected]> Co-authored-by: Luke Parker <[email protected]> Co-authored-by: Brendan Allan <[email protected]> Co-authored-by: opencode-agent[bot] <opencode-agent[bot]@users.noreply.github.com> Co-authored-by: Shoubhit Dash <[email protected]>
1 parent 2b1a5b1 commit 15faf1e

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

packages/opencode/src/tool/bash.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ Git Safety Protocol:
5858
- NEVER skip hooks (--no-verify, --no-gpg-sign, etc) unless the user explicitly requests it
5959
- NEVER run force push to main/master, warn the user if they request it
6060
- Avoid git commit --amend. ONLY use --amend when ALL conditions are met:
61-
(1) User explicitly requested amend, OR commit SUCCEEDED but pre-commit hook auto-modified files that need including
61+
(1) User explicitly requested amend, OR the commit succeeded and pre-commit hooks auto-modified files that need including — verify by checking `git log` that HEAD is the new commit before amending
6262
(2) HEAD commit was created by you in this conversation (verify: git log -1 --format='%an %ae')
6363
(3) Commit has NOT been pushed to remote (verify: git status shows "Your branch is ahead")
6464
- CRITICAL: If commit FAILED or was REJECTED by hook, NEVER amend - fix the issue and create a NEW commit

0 commit comments

Comments
 (0)