From: Namhyung Kim <namhyung@gmail.com>
To: Junio C Hamano <gitster@pobox.com>
Cc: Linus Torvalds <torvalds@linux-foundation.org>, git@vger.kernel.org
Subject: Re: [PATCH] find_unique_abbrev(): honor caller-supplied "len" better
Date: Sun, 13 Mar 2011 22:30:26 +0900 [thread overview]
Message-ID: <1300023026.1450.1.camel@leonhard> (raw)
In-Reply-To: <7vvczpff89.fsf@alter.siamese.dyndns.org>
2011-03-11 (금), 14:45 -0800, Junio C Hamano:
> Junio C Hamano <gitster@pobox.com> writes:
>
> > So let's scrap the abbrevguard thing. I somehow thought that I already
> > took your "make DEFAULT_ABBREV tweakable" patch, but apparently I didn't.
> > That one is the real fix to the issue of futureproofing.
>
> In return for a free education last night, I now owe you your patch from
> October last year, resurrected from the list archive, and here it is.
>
> With a forged sign-off from you, as I know that everything you write is
> supposed to be open source.
>
> - I do not think making minimum configurable is worth it, but I left it in
> (there is no UI to tweak it anyway).
>
> - I somewhat tweaked "describe" and "describe --abbrev" implementation.
> OPT__ABBREV() uses DEFAULT_ABBREV in its callback, so we need to read
> from the configuration before calling parse_options(). As it won't
> make any sense to call "git describe" outside repository where you
> cannot get to your configuration, I think it is safe to add a call to
> git_config() in this codepath. Other users of OPT__ABBREV() may need to
> be audited.
>
> By the way, I've already reverted the abbrevguard thing away.
>
> -- >8 --
> From: Linus Torvalds <torvalds@linux-foundation.org>
> Date: Thu, 28 Oct 2010 11:28:04 -0700
> Subject: [PATCH] Make the default abbrev length configurable
>
> The default of 7 comes from fairly early in git development, when
> seven hex digits was a lot (it covers about 250+ million hash
> values). Back then I thought that 65k revisions was a lot (it was what
> we were about to hit in BK), and each revision tends to be about 5-10
> new objects or so, so a million objects was a big number.
>
> These days, the kernel isn't even the largest git project, and even
> the kernel has about 220k revisions (_much_ bigger than the BK tree
> ever was) and we are approaching two million objects. At that point,
> seven hex digits is still unique for a lot of them, but when we're
> talking about just two orders of magnitude difference between number
> of objects and the hash size, there _will_ be collisions in truncated
> hash values. It's no longer even close to unrealistic - it happens all
> the time.
>
> We should both increase the default abbrev that was unrealistically
> small, _and_ add a way for people to set their own default per-project
> in the git config file.
>
> This is the first step to first make it configurable; the default of 7
> is not raised yet.
>
> Signed-off-by: Junio C Hamano <gitster@pobox.com>
> ---
Reviewed-by: Namhyung Kim <namhyung@gmail.com>
Thanks.
--
Regards,
Namhyung Kim
next prev parent reply other threads:[~2011-03-13 13:30 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <E1PBKT9-0004Uk-Sm@tytso-glaptop>
[not found] ` <20101028075631.GA7690@elte.hu>
[not found] ` <AANLkTi=8SbOZizWpxLg=Bgp7atdgr8MsR6tnRDYr1+eW@mail.gmail.com>
[not found] ` <20101028163854.GA15450@elte.hu>
[not found] ` <AANLkTin62vAwJxcsrFk6Yn7Q6tzr-D=EmKKwPazuAJ11@mail.gmail.com>
[not found] ` <20101028171701.GA18368@elte.hu>
2010-10-28 17:27 ` Minimum git commit abbrev length (Was Re: -tip: origin tree build failure (was: [GIT PULL] ext4 update) for 2.6.37) Ted Ts'o
2010-10-28 18:28 ` Linus Torvalds
2010-10-28 18:54 ` Linus Torvalds
2010-10-29 0:14 ` Minimum git commit abbrev length (Was Re: -tip: origin tree build failure Brandon Casey
[not found] ` <7veiba9ev2.fsf@alter.siamese.dyndns.org>
2011-03-10 22:37 ` [PATCH] find_unique_abbrev(): honor caller-supplied "len" better Junio C Hamano
2011-03-10 23:07 ` Linus Torvalds
2011-03-11 0:40 ` Junio C Hamano
2011-03-11 1:16 ` Linus Torvalds
2011-03-11 1:33 ` Junio C Hamano
2011-03-11 2:21 ` Linus Torvalds
2011-03-11 3:09 ` Junio C Hamano
2011-03-11 3:03 ` Junio C Hamano
2011-03-11 5:22 ` Jeff King
2011-03-11 5:33 ` Jeff King
2011-03-11 22:45 ` Junio C Hamano
2011-03-13 13:30 ` Namhyung Kim [this message]
2011-03-19 1:22 ` Jay Soffian
2011-03-19 16:24 ` Namhyung Kim
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=1300023026.1450.1.camel@leonhard \
--to=namhyung@gmail.com \
--cc=git@vger.kernel.org \
--cc=gitster@pobox.com \
--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;
as well as URLs for NNTP newsgroup(s).