On Tue, 13 May 2025 at 15:35, Jason Merrill <ja...@redhat.com> wrote:
>
> On 5/12/25 6:03 PM, Alejandro Colomar wrote:
> > On Mon, May 12, 2025 at 05:42:55PM +0100, Jonathan Wakely wrote:
> >> On Mon, 12 May 2025 at 17:34, Jonathan Wakely <jwak...@redhat.com> wrote:
> >>> On Mon, 12 May 2025 at 16:46, Alejandro Colomar <a...@kernel.org> wrote:
> >>>>
> >>>> contrib/ChangeLog:
> >>>>
> >>>>          * gcc-changelog/git_commit.py (GitCommit):
> >>>>          Add support for 'Link:' tags.
> >
> >>> What is a Link: tag? I assume this is some kind of Git trailer, but
> >>> what for? A URL?
> >
> > Yes.
> >
> >>> Why do we need to use a Git trailer for that instead
> >>> of just putting the URL in the commit message body?
> >
> > I'm used to link tags.  They keep the links relatively organized at one
> > per line.  I could add some accompanying text for each link, but that'd
> > be filling text for links that are better explained by themselves when
> > you open them.  I think the links by themselves make for a cleaner
> > commit message.  (Of course, there are exceptions, and some commits need
> > an explanation for links, but in this case there's no need, IMHO.)
> >
> >> It seems to be one of the more common trailers used in the linux
> >> kernel [1],
>
> Hmm, I don't see it in that list.  But it is described in
>   https://docs.kernel.org/process/submitting-patches.html

Sorry, I meant to link directly to this comment which has an analysis
of the frequency of different trailers:
https://www.reddit.com/r/git/comments/nl36wl/comment/gziw0pf/

The OP there only lists some of the amusing trailers seen only once in
the kernel history.


>
> "If related discussions or any other background information behind the
> change can be found on the web, add ‘Link:’ tags pointing to it. If the
> patch is a result of some earlier mailing list discussions or something
> documented on the web, point to it."
>
> >> Why do you "need" it for GCC?
> >
> > Need is too strong.  I think my commit message would be nicer with them.
> > I could add a paragraph for each link (or maybe several together in
> > one).  But even then, the link breaks the line at some weird point, and
> > it reads better with a link per line.  I don't know; it looks cleaner to
> > me.
>
> Can't you put a link on its own line without adding "Link:"?
>
> Since these links are presumably to give context to the patch, I'd
> prefer to keep them in the upper part of the commit message where that
> context goes.  Tags at the bottom of the commit are thus after the
> ChangeLog entries, separated from the rest of the rationale.
>
> You can even add Link: to the links if you feel like it, as long as they
> come before the ChangeLog.
>
> Jason
>

Reply via email to