Hi,
Andreas Enge <[email protected]> writes:
> On Sat, Nov 07, 2026 at 09:44:57PM +0100, Ludovic Courtès wrote:
>> I have this in ~/.gitconfig:
>> --8<---------------cut here---------------start------------->8---
>> [alias]
>> merge-pull-request="!m() { set -o pipefail; set -e; for id in
>> $(git cherry HEAD pulls/pr/$1 | cut -c2-); do git cherry-pick
>> --signoff $id; done; git commit --amend --no-edit --trailer 'Merges:
>> #'$1; }; m"
>> --8<---------------cut here---------------end--------------->8---
>> Thus, when I do ‘git merge-pull-request 123’, it automatically adds
>> “Merges: #123” as a trailer on the last commit.
>> I think we should agree on committers taking care of adding the trailer
>> via a tool along these lines.
>
> I have just tried it out, and it works well. Thanks!
>
> Concerning the format, I am also seeing this:
> Merges: guix/guix!123
> and for issues we use
> Fixes: guix/guix#123
>
> Maybe we should standardise towards
> Merges: guix/guix#123
I'd opt for the simplest; which is 'Merges: !123' (the ! is specifically
for PRs in Forgejo, while # is for issues).
As I wrote before, I still don't see the value of the guix/guix prefix
in front for Guix issues/PRs; if a reference to an external project is
needed, it could spell it out then, and only then, e.g. guile/guile#123,
to minimise typing/visual noise.
Finally, while it's useful to have the PR info annotated, I don't think
it should be made a requirement; searching in Codeberg to find a PR is
easy enough based on the commit title, and requesting users to add
'Merges' trailers reminds me a bit of the Change-Ids we just recently
abandoned.
If Forgejo did some magic in response to a 'Merges' trailer (like close
the associated PR), that would give me more of an incentive to use it
:-).
--
Thanks,
Maxim