summaryrefslogtreecommitdiff
path: root/sha1_name.c
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2011-03-10 22:41:14 -0800
committerJunio C Hamano <gitster@pobox.com>2011-03-10 22:41:14 -0800
commitea2c69ed4728070be1d2ee953a6948398b859150 (patch)
treec06653637abf13b0a1c833273bd2abd25c63eba4 /sha1_name.c
parent681186ae3ab340dd684b1d9e09b457baeb2331f9 (diff)
downloadgit-ea2c69ed4728070be1d2ee953a6948398b859150.tar.gz
Revert "core.abbrevguard: Ensure short object names stay unique a bit longer"
This reverts commit 72a5b561fc1c4286bc7c5b0693afc076af261e1f, as adding fixed number of hexdigits more than necessary to make one object name locally unique does not help in futureproofing the uniqueness of names we generate today. Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'sha1_name.c')
-rw-r--r--sha1_name.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/sha1_name.c b/sha1_name.c
index 709ff2eee6..faea58dc8c 100644
--- a/sha1_name.c
+++ b/sha1_name.c
@@ -208,9 +208,7 @@ const char *find_unique_abbrev(const unsigned char *sha1, int len)
if (exists
? !status
: status == SHORT_NAME_NOT_FOUND) {
- int cut_at = len + unique_abbrev_extra_length;
- cut_at = (cut_at < 40) ? cut_at : 40;
- hex[cut_at] = 0;
+ hex[len] = 0;
return hex;
}
len++;