Messages in this thread | | | Subject | Re: tip: New "Link:" tag to replace "LKML-Reference:" | From | Peter Zijlstra <> | Date | Thu, 07 Apr 2011 16:54:10 +0200 |
| |
On Thu, 2011-04-07 at 07:43 -0700, H. Peter Anvin wrote: > On 04/07/2011 07:08 AM, Peter Zijlstra wrote: > > > > OK, so I fixed my scripts to match this and it all seems to work, except > > for the: > > > > LKML-Reference: <new-submission> > > > > case, where the tip-bot would mail it out for me. While I try not to use > > it too much its convenient for quick fixes etc. Will the absence of a > > Link tag suffice or is there more to it? > > > > OK, I have asked for a long time that we do not use <new-submission>. > > The recommended pattern has been: > > LKML-Reference: <tip-*@git.kernel.org> > > ... which at least indicates to the user how the message-ID is to be > generated (* being a placeholder for the commit SHA1).
Oh, I never heard of that, it would've been easy to make my scripts do that if that were the preferred form, a well.
> The only think I can think of for how to make Link: work would be to > recognize a pattern that the tip-bot would use as its own Message-ID > *instead* of the commit SHA1 pattern that it would normally use. There > are disadvantages to every approach, of course. > > We have a couple of alternatives: > > a) Continue to use "LKML-Reference: <tip-*@git.kernel.org>" > + At least gives a hint how to find the newly-formed LKML thread > - Not a clickable link > - Somewhat noisy > b) Just Cc: everything to LKML regardless of tag > + Easy > - No way to *not* post everything to LKML > - No way to locate the thread without knowing the magic > c) A recognizable pattern with a unique pattern *generated by the > committer*, something like: > Link: http://lkml.kernel.org/r/tip-`uuidgen -r`@git.kernel.org > + Clickable link > - Long (the above is 86 characters wide) > - Message-IDs of a nonstandard form > - Bad things will happen if someone re-uses an identifier > - String has to be generated by machine at commit time > > [Using ranpwd instead of uuidgen allows for a more compact random string > by using a wider character set. For example: > > Link: http://lkml.kernel.org/r/tip-`ranpwd -l 24`@git.kernel.org > > ... has the same entropy but is 74 characters wide.]
Can't we use a prepare-commit-msg or commit-msg hook to re-write the commit message to include a Link tag when one is missing, using something like:
Link: http://lkml.kernel.org/r/tip-$SHA@git.kernel.org
And have the post-commit hook that sends the messages recognize this form and send the message using the correct msgid.
That way the commit includes a correct and clickable link, doesn't require magic knowledge and doesn't need the committer to do extra work. -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
| |