mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Stephen Rothwell <sfr@canb.auug.org.au>
To: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Jan Engelhardt <jengelh@medozas.de>,
	Andrew Morton <akpm@linux-foundation.org>,
	Eric Paris <eparis@redhat.com>,
	linux-kernel@vger.kernel.org, agruen@suse.de,
	davem@davemloft.net, andi@firstfloor.org
Subject: Abbrevieated SHA1s (Was: Re: Process to push changes to include/linux/types.h)
Date: Fri, 15 Oct 2010 14:03:19 +1100	[thread overview]
Message-ID: <20101015140319.3ddb06c3.sfr@canb.auug.org.au> (raw)
In-Reply-To: <AANLkTik+NENndwKFSFQoVAr0qiBWg5HOsQdVPmtNaSjC@mail.gmail.com>

[-- Attachment #1: Type: text/plain, Size: 1266 bytes --]

Hi Linus,

On Thu, 14 Oct 2010 15:13:27 -0700 Linus Torvalds <torvalds@linux-foundation.org> wrote:
>
> Extended background for non-git people: git _internally_ only uses the
> 160-bit SHA1 (which in its full ASCII form is 40 hex characters). But
> because that is so human-unfriendly, there are various human-readable
> ways to express it:
> 
>  - Just a shortened unique version, usually 7-12 hex characters. 12
> hex characters is already unique in practice for pretty much any
> reasonable project, and is much easier to write.

I have had one case I hit where an abbreviated SHA1 (which may have been
only 7 hex chars) was unique in your tree, but not in linux-next :-(  I
think it was unique after one more character, though.   Having this
happen was a pain, because git reacted badly to being given a non-unique
SHA1 to look up.  i.e. it did *not* say the expected "this sha1 is not
unique".   However, now it does, so things are getting better.  It would
probably be nice if it told you the "matching" objects ...

So I would support using (at least) 12 char abbreviations in commit
messages (and any other long lived context).
-- 
Cheers,
Stephen Rothwell                    sfr@canb.auug.org.au
http://www.canb.auug.org.au/~sfr/

[-- Attachment #2: Type: application/pgp-signature, Size: 490 bytes --]

  parent reply	other threads:[~2010-10-15  3:03 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-10-14 19:34 Process to push changes to include/linux/types.h Eric Paris
2010-10-14 19:45 ` Andi Kleen
2010-10-14 19:54 ` Andrew Morton
2010-10-14 21:26   ` Jan Engelhardt
2010-10-14 21:35     ` Eric Paris
2010-10-14 21:37     ` Andrew Morton
2010-10-14 21:46       ` Randy Dunlap
2010-10-14 21:50       ` Jan Engelhardt
2010-10-14 22:01         ` Andrew Morton
2010-10-14 22:13         ` Linus Torvalds
2010-10-14 23:05           ` Jan Engelhardt
2010-10-15  3:03           ` Stephen Rothwell [this message]
2010-10-15  8:22         ` Andi Kleen
2010-10-15  9:01           ` Andrew Morton
2010-10-15 10:15             ` Andreas Gruenbacher
2010-10-15 14:26               ` Andi Kleen
2010-10-15 14:44                 ` Andreas Gruenbacher
2010-10-15 15:24                   ` Jan Engelhardt
2010-10-15 10:13           ` Jan Engelhardt

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=20101015140319.3ddb06c3.sfr@canb.auug.org.au \
    --to=sfr@canb.auug.org.au \
    --cc=agruen@suse.de \
    --cc=akpm@linux-foundation.org \
    --cc=andi@firstfloor.org \
    --cc=davem@davemloft.net \
    --cc=eparis@redhat.com \
    --cc=jengelh@medozas.de \
    --cc=linux-kernel@vger.kernel.org \
    --cc=torvalds@linux-foundation.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

all inboxes | Powered by JetHome®