summaryrefslogtreecommitdiff
path: root/t/gitconfig-for-test
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2016-09-28 16:22:10 -0700
committerJunio C Hamano <gitster@pobox.com>2016-09-29 14:04:26 -0700
commitf2a7fdc9add7e1601242782f003516dad9e0eb42 (patch)
tree39bb5502bd779dc86a22b5c702ac772109fab565 /t/gitconfig-for-test
parent333fc6db9a70d6ef2d64762e425d176be01b0c4e (diff)
downloadgit-jc/abbrev-12.tar.gz
core.abbrev: raise the default abbreviation to 12 hexdigitsjc/abbrev-12
As Peff said, responding in a thread started by Linus's suggestion to raise the default abbreviation to 12 hexdigits: I actually think "12" might be sane for a long time. That's 48 bits of sha1, so we'd expect a 50% chance of a single collision at 2^24, or 16 million. The biggest repository I know about (in number of objects) is the one holding all of the objects for all of the forks of torvalds/linux on GitHub. It's at about 15 million objects. Which seems close, but remember that's the size where we expect to see a single collision. They don't become common until much later (I didn't compute an exact number, but Linus's 16x sounds about right). I know that the growth of the kernel isn't really linear, but I think the need to bump to "13" might not just be decades, but possibly a century or more. So 12 seems reasonable, and the only downside for it (or for "13", for that matter) is a few extra bytes. I dunno, maybe people will really hate that, but I have a feeling these are mostly cut-and-pasted anyway. And this does exactly that. Keep the tests working by explicitly asking for the old 7 hexdigits setting in the fake system-wide configuration file used for tests. Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 't/gitconfig-for-test')
-rw-r--r--t/gitconfig-for-test3
1 files changed, 3 insertions, 0 deletions
diff --git a/t/gitconfig-for-test b/t/gitconfig-for-test
index 4598885ed5..8c284425d7 100644
--- a/t/gitconfig-for-test
+++ b/t/gitconfig-for-test
@@ -4,3 +4,6 @@
;; [user]
;; name = A U Thor
;; email = author@example.com
+
+[core]
+ abbrev = 7