From: Linus Torvalds <torvalds@linux-foundation.org>
To: Paul Mackerras <paulus@samba.org>
Cc: Git Mailing List <git@vger.kernel.org>
Subject: Re: gitk: Turn short SHA1 names into links too
Date: Thu, 25 Sep 2008 17:37:10 -0700 (PDT) [thread overview]
Message-ID: <alpine.LFD.1.10.0809251729440.3265@nehalem.linux-foundation.org> (raw)
In-Reply-To: <alpine.LFD.1.10.0809251657080.3265@nehalem.linux-foundation.org>
On Thu, 25 Sep 2008, Linus Torvalds wrote:
>
> And the thing I wanted to work was to have the abbreviated SHA1's that
> have started to get more common in the kernel commit logs work as links in
> gitk too, just the way a full 40-character SHA1 link works.
For a test-case, I just pushed out my current top-of-tree that finally
pushed me over the edge. I've seen this before, but I couldn't really
force me to do anything about it until now.
So to see this in action, do
gitk v2.6.26..6ef190c
on the current kernel repo, and notice that "Commit ee1e2c82 ("IPoIB:
Refresh paths .." thing, where we want that 'ee1e2c82' to be a link even
though it's not a full SHA1.
Of course, the matching could be better, it will now accept any random 6+
character sequence of hex characters, even if they are surrounded by
characters that make it clear that it's not a SHA1 ("Haahahhaaaaaa!"
would find the 'aaaaaa' and if you have a commit that starts with that,
link to it ;)
And because it's the top commit, you can also easily see the behavior that
it doesn't turn out to be a link immediately, and you have to do
cursor-down + cursor-up to get the link. The "it points to the wrong line"
bug is much harder to trigger, and possibly impossible with that
particular case (to trigger it, you need a setup where the first layout of
the target commit then gets changed by the topo-sort, I'm not sure that
will happen at all, and if it does, I'm not sure you could time it just
right either, but I _have_ seen it in real life).
Linus
next prev parent reply other threads:[~2008-09-26 0:38 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-09-26 0:11 gitk: Turn short SHA1 names into links too Linus Torvalds
2008-09-26 0:37 ` Linus Torvalds [this message]
2008-09-26 6:32 ` Wincent Colaiuta
2008-09-26 7:26 ` Andreas Ericsson
2008-09-26 7:29 ` Wincent Colaiuta
2008-09-26 8:21 ` Mikael Magnusson
2008-09-26 12:15 ` Brad King
2008-09-26 10:41 ` Marco Costalba
2008-09-27 3:18 ` Paul Mackerras
2008-09-27 3:16 ` Paul Mackerras
2008-10-20 23:20 ` Paul Mackerras
2008-10-21 19:09 ` Junio C Hamano
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
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=alpine.LFD.1.10.0809251729440.3265@nehalem.linux-foundation.org \
--to=torvalds@linux-foundation.org \
--cc=git@vger.kernel.org \
--cc=paulus@samba.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.
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 NNTP newsgroup(s).