Skip to content

merge queue: embarking main (25c2d4f), #1386 and #1384 together#1401

Closed
mergify[bot] wants to merge 4 commits into
mainfrom
mergify/merge-queue/6857b1a5d1
Closed

merge queue: embarking main (25c2d4f), #1386 and #1384 together#1401
mergify[bot] wants to merge 4 commits into
mainfrom
mergify/merge-queue/6857b1a5d1

Conversation

@mergify
Copy link
Copy Markdown
Contributor

@mergify mergify Bot commented May 11, 2026

🎉 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 default for merge:

Required conditions to stay in the queue:

---
checking_base_sha: 2a1512269a7d87f33d2aa31e08034015037d1799
previous_failed_batches: []
pull_requests:
  - number: 1384
    scopes: []
scopes: []
...

jd and others added 4 commits May 8, 2026 15:16
…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
@mergify mergify Bot deployed to Mergify Merge Protections May 11, 2026 08:36 Active
@mergify mergify Bot temporarily deployed to func-tests-live May 11, 2026 08:36 Inactive
@mergify mergify Bot closed this May 11, 2026
@mergify mergify Bot deleted the mergify/merge-queue/6857b1a5d1 branch May 11, 2026 08:50
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