merge queue: embarking main (25c2d4f), #1386 and #1384 together#1401
Closed
mergify[bot] wants to merge 4 commits into
Closed
merge queue: embarking main (25c2d4f), #1386 and #1384 together#1401mergify[bot] wants to merge 4 commits into
mergify[bot] wants to merge 4 commits into
Conversation
…icts `stack_squash` with `-m` writes the new commit message to a temp file and inserts an `exec git commit --amend -F <tmpfile>` line in the rebase todo. The previous code wrapped the rebase in `try/finally` so the temp file was unlinked even when the rebase failed mid-way (e.g. conflicts on a fixup line that runs before the exec). After the user resolved conflicts and ran `git rebase --continue`, git would replay the exec line and fail because the message file no longer existed. Drop the `finally`; only unlink on the success path. If the rebase raises SystemExit, the file persists so `--continue` can still execute the amend. The temp file lives in `/tmp` and gets cleaned by the OS. Same pattern (and same fix) as `stack_reword` — flagged by Copilot on Change-Id: Ia026b5b631ed043a03983beec5ca81fd29f77633 #1384 review.
Add "mergify stack reword COMMIT [-m MESSAGE]" which changes a single commit's message non-interactively, replacing the manual "GIT_SEQUENCE_EDITOR='sed -i ... pick → reword' git rebase -i" recipe. With -m, the rebase keeps COMMIT as `pick` and inserts an `exec git commit --amend -F <tmpfile>` line right after it — the amend runs while HEAD still points at the target, so prepare-commit-msg re-attaches the Change-Id via the existing hook. Multi-line messages are passed via the temp file rather than `-m "..."`, so they survive embedding into a single rebase-todo line. Without -m, COMMIT is marked as `reword` so git stops and opens $GIT_EDITOR for that commit only — convenient in a TTY, but it will hang in agent contexts (pass -m to stay non-interactive). Errors when COMMIT prefix is unknown. Supports --dry-run. Also documents the reword command in skills/mergify-stack/SKILL.md. Change-Id: Ic8d3c0b7f74501fc3eecb5bafe4b3922af697f40
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
🎉 This pull request has been checked successfully and will be merged soon. 🎉
Branch main (25c2d4f), #1386 and #1384 are embarked together for merge.
This pull request has been created by Mergify to speculatively check the mergeability of #1384.
You don't need to do anything. Mergify will close this pull request automatically when it is complete.
Required conditions of queue rule
defaultfor merge:title ~= ^(fix|feat|docs|style|refactor|perf|test|build|ci|chore|revert|ui)(?:\(.+\))?:#approved-reviews-by>=2author = dependabot[bot]author = mergify-ci-botauthor = renovate[bot]body ~= (?ms:.{48,})#changes-requested-reviews-by = 0#review-requested = 0#review-threads-unresolved = 0check-success=ci-gateRequired conditions to stay in the queue:
base=mainlabel!=manual mergetitle ~= ^(fix|feat|docs|style|refactor|perf|test|build|ci|chore|revert|ui)(?:\(.+\))?:#approved-reviews-by>=2author = dependabot[bot]author = mergify-ci-botauthor = renovate[bot]body ~= (?ms:.{48,})#changes-requested-reviews-by = 0#review-requested = 0#review-threads-unresolved = 0check-success=ci-gate