Skip to content

Conversation

@mergify
Copy link
Contributor

@mergify mergify bot commented Jan 14, 2026

🎉 This pull request has been checked successfully and will be merged soon. 🎉

Branch main (504fb53) and #903 are embarked together for merge.

This pull request has been created by Mergify to speculatively check the mergeability of #903.
You don't need to do anything. Mergify will close this pull request automatically when it is complete.

Required conditions of queue default for merge:

Required conditions to stay in the queue:

---
checking_base_sha: 504fb538120c967976e1840424b8feba45bac4a3
previous_failed_batches: []
pull_requests:
  - number: 903
...

jd and others added 2 commits January 13, 2026 21:12
When tools like Claude Code amend commits using `git commit --amend -m "msg"`,
the Change-Id was being lost because:
1. The -m flag replaces the entire commit message
2. The commit-msg hook only preserves Change-Id if already present in the message

This adds a prepare-commit-msg hook that detects amend operations and preserves
the original Change-Id. The detection works by comparing GIT_AUTHOR_DATE (which
git sets to the original commit's author date during --amend) with HEAD's author
date. An additional check ensures the date is at least 2 seconds old to avoid
false positives when commits happen in quick succession.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Change-Id: Ic5abaa3b20d6cc789d6a20379062fbcb3d7e54ac
@mergify mergify bot deployed to Mergify Merge Protections January 14, 2026 10:12 Active
@mergify
Copy link
Contributor Author

mergify bot commented Jan 14, 2026

🧪 CI Insights

Here's what we observed from your CI run for ec63d20.

🟢 All jobs passed!

But CI Insights is watching 👀

@mergify mergify bot closed this Jan 14, 2026
@mergify mergify bot deleted the mergify/merge-queue/09ee8ddfa9 branch January 14, 2026 10:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

1 participant