From mboxrd@z Thu Jan 1 00:00:00 1970 From: Stephen Kelly Subject: Re: Why doesn't gitk highlight commit references from git-describe? Date: Wed, 13 Apr 2016 23:55:49 +0200 Message-ID: References: Mime-Version: 1.0 Content-Type: text/plain; charset="ISO-8859-1" Content-Transfer-Encoding: 7Bit To: git@vger.kernel.org X-From: git-owner@vger.kernel.org Wed Apr 13 23:56:12 2016 Return-path: Envelope-to: gcvg-git-2@plane.gmane.org Received: from vger.kernel.org ([209.132.180.67]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1aqSle-0002FI-VM for gcvg-git-2@plane.gmane.org; Wed, 13 Apr 2016 23:56:11 +0200 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752030AbcDMV4H (ORCPT ); Wed, 13 Apr 2016 17:56:07 -0400 Received: from plane.gmane.org ([80.91.229.3]:44178 "EHLO plane.gmane.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750922AbcDMV4F (ORCPT ); Wed, 13 Apr 2016 17:56:05 -0400 Received: from list by plane.gmane.org with local (Exim 4.69) (envelope-from ) id 1aqSlS-00029F-AY for git@vger.kernel.org; Wed, 13 Apr 2016 23:55:58 +0200 Received: from x55b39f7f.dyn.telefonica.de ([85.179.159.127]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Wed, 13 Apr 2016 23:55:58 +0200 Received: from steveire by x55b39f7f.dyn.telefonica.de with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Wed, 13 Apr 2016 23:55:58 +0200 X-Injected-Via-Gmane: http://gmane.org/ X-Complaints-To: usenet@ger.gmane.org X-Gmane-NNTP-Posting-Host: x55b39f7f.dyn.telefonica.de User-Agent: KNode/4.14 pre Sender: git-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: git@vger.kernel.org Archived-At: 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.