Skip to content

Commit bb3509b

Browse files
altendkyrekram1-nodeHonaBrendonovichopencode-agent[bot]
authored
fix(opencode): clarify git amend condition to require verifying commit landed (#19937)
Co-authored-by: Aiden Cline <63023139+rekram1-node@users.noreply.github.com> Co-authored-by: Luke Parker <10430890+Hona@users.noreply.github.com> Co-authored-by: Brendan Allan <14191578+Brendonovich@users.noreply.github.com> Co-authored-by: opencode-agent[bot] <opencode-agent[bot]@users.noreply.github.com> Co-authored-by: Shoubhit Dash <shoubhit2005@gmail.com>
1 parent 4a67905 commit bb3509b

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)