git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: Referring to commits in commit messages

From
Jeff King <peff@peff.net>
Date
Dec 20, 2018, 02:51 UTC
Message-ID
<20181220025111.GA24002@sigill.intra.peff.net>
In-Reply-To
<20181219232948.GD228469@google.com>
On Wed, Dec 19, 2018 at 03:29:48PM -0800, Jonathan Nieder wrote:
Show 6 quoted lines
> > I'm also not sure it really matters all that much either way. If you buy
> > my argument that this is just about placing the general era of the
> > commit in the mind of the reader, then "just before v2.11" or "just
> > after v2.11" are about the same.
> 
> If it's that unreliable, I'd rather just have the hash, to be honest.

Well, that was sort of my point. :) I think the hash is the most interesting part, and everything else is gravy for the reader to save them time digging into the commit.

Show 5 quoted lines
> > I think that's a good idea if something is in fact being fixed. But
> > there are many other reasons to refer to another commit in prose (or
> > even outside of a commit message entirely).
> 
> Sure, but in those cases do we need the ability to query on them?

I'm not sure what you mean. We were talking about how to reference commits in prose. I think a "Fixes" trailer eliminates the need to do so (or least makes it redundant) in _some_ cases, but the other cases are still of interest.

Show 5 quoted lines
> To me it seems similar to having a policy on how to reference people
> in commit messages (e.g. "always include their email address"), so
> that I can grep for a contributor to see how they were involved in a
> patch.  If it's not structured data, then at some point I stop
> worrying so much about machine parsability.
Sure. All I'm really saying is "always include the hash".
-Peff
Previous: Jonathan NiederNext: Ævar Arnfjörð Bjarmason
Message 16 of 17 in “stripspace: allow -s/-c outside git repository”
  1. stripspace: allow -s/-c outside git repositoryJonathan Nieder, Dec 17, 2018
  2. Martin ÅgrenDec 18, 2018
  3. Johannes SchindelinDec 18, 2018
  4. Martin ÅgrenDec 19, 2018
  5. Johannes SchindelinDec 18, 2018
  6. Referring to commits in commit messagesÆvar Arnfjörð Bjarmason, Dec 19, 2018
  7. Duy NguyenDec 19, 2018
  8. Jonathan NiederDec 19, 2018
  9. Ævar Arnfjörð BjarmasonDec 20, 2018
  10. Jacob KellerDec 24, 2018
  11. SZEDER GáborDec 19, 2018
  12. Jeff KingDec 19, 2018
  13. Jonathan NiederDec 19, 2018
  14. Jeff KingDec 19, 2018
  15. Jonathan NiederDec 19, 2018
  16. Jeff KingDec 20, 2018
  17. Ævar Arnfjörð BjarmasonDec 19, 2018

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.