All of lore.kernel.org
 help / color / mirror / Atom feed
From: Junio C Hamano <gitster@pobox.com>
To: Sam Vilain <sam@vilain.net>
Cc: Anders Melchiorsen <mail@cup.kalibalik.dk>,
	git@vger.kernel.org, jnareb@gmail.com
Subject: Re: [PATCH] gitweb: recognize six digit abbreviated SHA1
Date: Tue, 13 Jan 2009 00:26:37 -0800	[thread overview]
Message-ID: <7vd4erd32a.fsf@gitster.siamese.dyndns.org> (raw)
In-Reply-To: <496BF5D7.2090003@vilain.net> (Sam Vilain's message of "Tue, 13 Jan 2009 15:00:55 +1300")

Sam Vilain <sam@vilain.net> writes:

> I think if you're going to go so short as 6 digits, it's probably worth
> making sure that the really short SHA1s check commits only. eg, if
> you've got a commit 'fa023473' and a tree 'fa023421', then 'fa0234'
> should match the commit and not the tree. But I don't think there's a
> plumbing way to do a query like that at the moment.

When people give an abbreviated object name, 99% of the time they mean
commits (and "index deadbeef..acebead" in a patch is a good place to pick
blob object names from, which would be what the 99% of the remaining 1%
would name), so making sure it is a commit or a blob would be a very
sensible thing to do.

Unfortunately, you fundamentally cannot do this without taking a
performance hit of actually opening the object.

  reply	other threads:[~2009-01-13  8:28 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-01-13  0:04 [PATCH] gitweb: recognize six digit abbreviated SHA1 Anders Melchiorsen
2009-01-13  0:08 ` Anders Melchiorsen
2009-01-13  2:00   ` Sam Vilain
2009-01-13  8:26     ` Junio C Hamano [this message]
2009-01-14  0:33       ` Sam Vilain

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=7vd4erd32a.fsf@gitster.siamese.dyndns.org \
    --to=gitster@pobox.com \
    --cc=git@vger.kernel.org \
    --cc=jnareb@gmail.com \
    --cc=mail@cup.kalibalik.dk \
    --cc=sam@vilain.net \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.