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

Re: Why doesn't gitk highlight commit references from git-describe?

From
SKStephen Kelly <steveire@gmail.com>
Date
Apr 13, 2016, 21:55 UTC
Message-ID
<nemf95$e1u$1@ger.gmane.org>
In-Reply-To
<CAGZ79kY_C9wSS+z7XwPEWiM+8vhYuZzs_SPZ0mQR=LB+MPzTJg@mail.gmail.com>
Stefan Beller wrote:
> We also want to have 4b9ab0ee0130~1^2 to work `right`, in the sense
> that not just the hexadecimals are highlighted and linking to
> 4b9ab0ee0130, but the whole expression should link to 49e863b02ae177.

Presumably the same logic which finds 4b9ab0ee0130 to link it can also see if it is suffixed with '~1^2' ?

Is a ref like 4b9ab0ee0130~1^2 commonly useful? In cmake we use the output of cmake describe --contains (when there is a following tag) to refer to commits, in a pattern which I've also seen in git.git occasionally:

 https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=23f3798c

I think the only reason for using the output of cmake describe --contains is that it shows the reader the 'era' of the commit (and release it appears in) without having to look it up. I'm not really aware of another good reason to use it, but I think that's enough to make sense.

However I'm not sure I understand why anyone would refer to 4b9ab0ee0130~1^2 instead of 49e863b0 (or perhaps v2.6.5~12, depending on whether the tag is there).

>> What does 'HEAD^' mean? If it is 'the commit before this one', then why
>> not link it?
> 
> As said I was thinking about the git development
> I do not think we would want to link HEAD to anything in that example.
> (I'd have no idea what it would link to here, so just not link it?)
Right, so if a commit message contains something like 
 Make git rebase -i HEAD^^^^ ten times better
then HEAD^^^^ shouldn't become a link. Makes sense to me.
Thanks,
Steve.
Previous: Junio C HamanoNext: Stephen Kelly
Message 6 of 8 in “Why doesn't gitk highlight commit references from git-describe?”
  1. Stephen KellyApr 13, 2016
  2. Stefan BellerApr 13, 2016
  3. Junio C HamanoApr 13, 2016
  4. Stefan BellerApr 13, 2016
  5. Junio C HamanoApr 13, 2016
  6. Stephen KellyApr 13, 2016
  7. Stephen KellyApr 13, 2016
  8. Stephen KellyApr 13, 2016

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.