Hi Andreas,
Andreas Enge <[email protected]> writes: > Am Sat, May 30, 2026 at 12:11:24AM +0900 schrieb Nguy > n Gia Phong via Development of GNU Guix and the GNU System distribution.: >> The same trailer can be used on all rebased commits IMHO. > > This sounds like a lot of work, in particular since the PR number is > only known once the PR has been submitted. So far for "Fixes:" I have > added the line only on the last commit (which for issues immediately > makes sense, since they are not fixed until the last commit is pushed). I think is why adding `Merges` is better in the responsibility of the committer, not the submitter. It would be hard for the contributor, who might be changing the commits, they would always have to change the messages. Also, sometimes the committer might choose to not apply all of the commits from the PR. I use ``` [alias] merge-pr = "!f() { \ if ! git diff --cached --quiet; then \ echo 'Error: You have staged changes. Commit or stash them first.'; \ return 1; \ fi; \ git fetch origin refs/pull/\"$1\"/head && \ git cherry-pick \"$2..FETCH_HEAD\" --signoff && \ git commit --amend --no-edit -m \"$(git log -1 --format=%B)$(echo -e \"\nMerges: #$1\")\"; \ }; f" ``` to add Merges automatically on `git merge-pr 1234`. For this to work as is you also need to have the refs/pull added in remote fetch. ``` [remote "origin"] fetch = +refs/pull/*:refs/remotes/origin/pull/* fetch = +refs/heads/*:refs/remotes/origin/* url = [email protected]:guix/guix.git ``` This is then similar to the Signed-off-by footer. Rutherther > > Andreas
