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
Stefan Beller <sbeller@google.com>
Date
Apr 13, 2016, 21:27 UTC
Message-ID
<CAGZ79kZVC0FxUN45KgLh-2tEK2=j2-yyTajYOc=s-LECgx+yqQ@mail.gmail.com>
In-Reply-To
<nemal5$mb$1@ger.gmane.org>
On Wed, Apr 13, 2016 at 1:36 PM, Stephen Kelly <steveire@gmail.com> wrote:
Show 6 quoted lines
> Hi,
>
> If I look at git commit 89ea90351dd32fbe384d0cf844640a9c55606f3b in gitk, it
> does not linkify the v1.6.0-rc0~120^2 in the commit message.
>
> Is there any reason for that, or can gitk be changed?
Sure it can be changed. Go for it.

I think it is hard though. So for example it is easy to spot sha1s and link them (see a6ee883b8e as an example picking up ebef7e5 as a link.)

How would you know(/code) that v1.6.0-rc0~120^2 is a text worth linking? "v1.6.0-rc0" is a custom string as that is how we name tags in this project. It can follow any convention in other projects.

Maybe a first approximation is if there is a `~` followed by numbers or a ^ character, inspect the whole thing if it is a reference into the history?

(Special case for git.git: Sometimes in a discussion you want to explain stuff and may use HEAD^ or such to demonstrate the use case. Other projects would not use that as much in descriptive text I would assume. So we'd need to make sure changing refs (i.e. branches, symbolic refs such as HEAD, FETCH_HEAD) are not considered worth linkifying.)

Thanks, Stefan

Show 10 quoted lines
>
> Thanks,
>
> Steve.
>
>
> --
> To unsubscribe from this list: send the line "unsubscribe git" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
Previous: Stephen KellyNext: Junio C Hamano
Message 2 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.