Skip to content

fix(stack): refuse an amend at a rebase conflict pause#1730

Draft
JulianMaurin wants to merge 1 commit into
mainfrom
devs/JulianMaurin/improve-mergify-stack-skill/refuse-amend-rebase-conflict-pause--a59c6db0
Draft

fix(stack): refuse an amend at a rebase conflict pause#1730
JulianMaurin wants to merge 1 commit into
mainfrom
devs/JulianMaurin/improve-mergify-stack-skill/refuse-amend-rebase-conflict-pause--a59c6db0

Conversation

@JulianMaurin

Copy link
Copy Markdown
Contributor

At a conflict the pick being replayed has not produced a commit yet, so
HEAD is the last commit the rebase applied — the trunk tip when the
bottom commit conflicted, otherwise an earlier commit of the stack.
git commit --amend there rewrites that commit and stamps the work with
its message and Change-Id, mapping it to the wrong pull request.

The commit-msg hook now refuses it. A stack edit pause records its
target in rebase-merge/amend and stays allowed, the sequencer's own
commit during git rebase --continue never reaches this hook, and
--no-verify overrides.

Co-Authored-By: Claude Opus 4.8 noreply@anthropic.com

Depends-On: #1729

@JulianMaurin

JulianMaurin commented Jul 20, 2026

Copy link
Copy Markdown
Contributor Author

This pull request is part of a Mergify stack:

# Pull Request Link
1 fix(stack): carry the revision note onto the rewritten commit #1729
2 fix(stack): refuse an amend at a rebase conflict pause #1730 👈
3 docs(stack): record what a stack push rebases away in the skill #1724

@mergify
mergify Bot had a problem deploying to Mergify Merge Protections July 20, 2026 13:25 Failure
@mergify

mergify Bot commented Jul 20, 2026

Copy link
Copy Markdown
Contributor

Merge Protections

🔴 2 of 7 protections blocking · waiting on 👀 reviews

Protection Waiting on
🔴 👀 Review Requirements 👀 reviews
🔴 🔎 Reviews 👀 reviews
🟢 ⛓️ Depends-On Requirements
🟢 🤖 Continuous Integration
🟢 Enforce conventional commit
🟢 📕 PR description
🟢 🚦 Auto-queue

🔴 👀 Review Requirements

Waiting for

  • #approved-reviews-by>=2
This rule is failing.
  • any of:
    • #approved-reviews-by>=2
    • author = dependabot[bot]
    • author = mergify-ci-bot
    • author = renovate[bot]

🔴 🔎 Reviews

Waiting for

  • #review-requested = 0
This rule is failing.
  • #review-requested = 0
  • #changes-requested-reviews-by = 0
  • #review-threads-unresolved = 0

Show 5 satisfied protections

🟢 ⛓️ Depends-On Requirements

Requirement based on the presence of Depends-On in the body of the pull request

🟢 🤖 Continuous Integration

  • all of:
    • check-success=ci-gate

🟢 Enforce conventional commit

Make sure that we follow https://www.conventionalcommits.org/en/v1.0.0/

  • title ~= ^(fix|feat|internal|docs|style|refactor|perf|test|build|ci|chore|revert|ui)(?:\(.+\))?!?:

🟢 📕 PR description

  • body ~= (?ms:.{48,})

🟢 🚦 Auto-queue

When all merge protections are satisfied, this pull request will be queued automatically.

@mergify
mergify Bot requested a review from a team July 20, 2026 13:31
@JulianMaurin
JulianMaurin force-pushed the devs/JulianMaurin/improve-mergify-stack-skill/refuse-amend-rebase-conflict-pause--a59c6db0 branch from d575d5e to baa7a73 Compare July 20, 2026 14:35
@JulianMaurin
JulianMaurin force-pushed the devs/JulianMaurin/improve-mergify-stack-skill/carry-revision-note-onto-rewritten-commit--0e5503e0 branch from 898bb48 to 4c82e38 Compare July 20, 2026 14:35
@JulianMaurin

JulianMaurin commented Jul 20, 2026

Copy link
Copy Markdown
Contributor Author

Revision history

# Type Changes Reason Date
1 initial d575d5e 2026-07-20 14:36 UTC
2 content d575d5e → baa7a73 (raw) 2026-07-20 14:36 UTC
3 rebase baa7a73 → b361ce0 (rebase only) 2026-07-20 15:20 UTC

@mergify
mergify Bot had a problem deploying to Mergify Merge Protections July 20, 2026 14:36 Failure
At a conflict the pick being replayed has not produced a commit yet, so
HEAD is the last commit the rebase applied — the trunk tip when the
bottom commit conflicted, otherwise an earlier commit of the stack.
`git commit --amend` there rewrites that commit and stamps the work with
its message and Change-Id, mapping it to the wrong pull request.

The commit-msg hook now refuses it. A `stack edit` pause records its
target in `rebase-merge/amend` and stays allowed, the sequencer's own
commit during `git rebase --continue` never reaches this hook, and
`--no-verify` overrides.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Change-Id: Ia59c6db0b1f8e729ea2142f00c1c56db94dd51d5
@JulianMaurin
JulianMaurin force-pushed the devs/JulianMaurin/improve-mergify-stack-skill/refuse-amend-rebase-conflict-pause--a59c6db0 branch from baa7a73 to b361ce0 Compare July 20, 2026 15:20
@JulianMaurin
JulianMaurin force-pushed the devs/JulianMaurin/improve-mergify-stack-skill/carry-revision-note-onto-rewritten-commit--0e5503e0 branch from 4c82e38 to 39b4faa Compare July 20, 2026 15:20
@mergify
mergify Bot had a problem deploying to Mergify Merge Protections July 20, 2026 15:20 Failure
Base automatically changed from devs/JulianMaurin/improve-mergify-stack-skill/carry-revision-note-onto-rewritten-commit--0e5503e0 to main July 21, 2026 07:42
@mergify
mergify Bot force-pushed the devs/JulianMaurin/improve-mergify-stack-skill/refuse-amend-rebase-conflict-pause--a59c6db0 branch from b361ce0 to 8f8fc68 Compare July 21, 2026 07:42
@mergify
mergify Bot temporarily deployed to func-tests-live July 21, 2026 07:42 Inactive
@mergify
mergify Bot had a problem deploying to Mergify Merge Protections July 21, 2026 07:42 Failure
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