git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
From: Stephen Kelly <steveire@gmail.com>
To: git@vger.kernel.org
Subject: Re: Why doesn't gitk highlight commit references from git-describe?
Date: Wed, 13 Apr 2016 23:55:49 +0200	[thread overview]
Message-ID: <nemf95$e1u$1@ger.gmane.org> (raw)
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.

  parent reply	other threads:[~2016-04-13 21:56 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-04-13 20:36 Why doesn't gitk highlight commit references from git-describe? Stephen Kelly
2016-04-13 21:27 ` Stefan Beller
2016-04-13 21:32   ` Junio C Hamano
2016-04-13 21:45     ` Stefan Beller
2016-04-13 21:50       ` Junio C Hamano
2016-04-13 21:55       ` Stephen Kelly [this message]
2016-04-13 21:57         ` Stephen Kelly
2016-04-13 21:41   ` Stephen Kelly

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: http://vger.kernel.org/majordomo-info.html

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='nemf95$e1u$1@ger.gmane.org' \
    --to=steveire@gmail.com \
    --cc=git@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://80x24.org/mirrors/git.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).