From: Ewout ter Hoeven Date: Sun, 15 Nov 2026 11:03:05 GMT Subject: Re: [PATCH] headers: Preserve 'change-id' header in rebase / cherry-pick. Message-ID: In-Reply-To: On 2026-04-07 at 23:28, brian m. carlson wrote: > Absent some well-defined documentation describing what it means, I don't > see how it could provide good value. A concrete use case could be stacked pull/merge requests. GitHub's stacked PRs (CLI in github/gh-stack) and GitLab's experimental "glab stack" both have to answer "is this rewritten commit the same change as before?" after every rebase. Without an identity that survives rewrites they guess from branch names, recorded bases and patch IDs, and the guesses fail in practice: - Renaming a branch with plain "git branch -m" strands the stack, because the tool tracks layers by branch name (https://github.com/github/gh-stack/issues/423). - When a lower layer is rewritten, its old commits are replayed onto the new copies because patch IDs no longer match; one user reports 61 commits replayed, 53 of them already in the parent (https://github.com/github/gh-stack/discussions/600). - In a review of glab's stacked diffs, GitLab's Git (Gitaly) engineers discussed moving towards change IDs for the same reason (https://gitlab.com/gitlab-org/cli/-/issues/8040). Each tool works around this with its own metadata, which plain git commands then invalidate. A header that git preserves would let them use git as the source of truth.