summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 681186a)
raw | patch | inline | side by side (parent: 681186a)
author | Junio C Hamano <gitster@pobox.com> | |
Fri, 11 Mar 2011 06:41:14 +0000 (22:41 -0800) | ||
committer | Junio C Hamano <gitster@pobox.com> | |
Fri, 11 Mar 2011 06:41:14 +0000 (22:41 -0800) |
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>
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>
Documentation/config.txt | patch | blob | history | |
cache.h | patch | blob | history | |
config.c | patch | blob | history | |
environment.c | patch | blob | history | |
sha1_name.c | patch | blob | history |
index c5e183516a104e6efb7ed597fb4498d75560ab68..84e308fce5b2a0a67dcb64a98e414c49e4cd3b01 100644 (file)
--- a/Documentation/config.txt
+++ b/Documentation/config.txt
If true, git will warn you if the ref name you passed it is ambiguous
and might match multiple refs in the .git/refs/ tree. True by default.
-core.abbrevguard::
- Even though git makes sure that it uses enough hexdigits to show
- an abbreviated object name unambiguously, as more objects are
- added to the repository over time, a short name that used to be
- unique will stop being unique. Git uses this many extra hexdigits
- that are more than necessary to make the object name currently
- unique, in the hope that its output will stay unique a bit longer.
- Defaults to 0.
-
core.compression::
An integer -1..9, indicating a default compression level.
-1 is the zlib default. 0 means no compression,
index 3abf8950bdd9f950b65ee4544e0cfe6517f1912a..c7b0a28352988fec3550da78f2e1ea401810bbd4 100644 (file)
--- a/cache.h
+++ b/cache.h
extern int prefer_symlink_refs;
extern int log_all_ref_updates;
extern int warn_ambiguous_refs;
-extern int unique_abbrev_extra_length;
extern int shared_repository;
extern const char *apply_default_whitespace;
extern const char *apply_default_ignorewhitespace;
diff --git a/config.c b/config.c
index 625e0518767712583f917762634c2fc852c4d2eb..47e6ba5a3b5820a2837aca3f140bf1b8738821e2 100644 (file)
--- a/config.c
+++ b/config.c
return 0;
}
- if (!strcmp(var, "core.abbrevguard")) {
- unique_abbrev_extra_length = git_config_int(var, value);
- if (unique_abbrev_extra_length < 0)
- unique_abbrev_extra_length = 0;
- return 0;
- }
-
if (!strcmp(var, "core.bare")) {
is_bare_repository_cfg = git_config_bool(var, value);
return 0;
diff --git a/environment.c b/environment.c
index 9564475f429312a467a020106f7443112367d5da..c3efbb96084de04465f7eff45376cadc3ab2526b 100644 (file)
--- a/environment.c
+++ b/environment.c
int is_bare_repository_cfg = -1; /* unspecified */
int log_all_ref_updates = -1; /* unspecified */
int warn_ambiguous_refs = 1;
-int unique_abbrev_extra_length;
int repository_format_version;
const char *git_commit_encoding;
const char *git_log_output_encoding;
diff --git a/sha1_name.c b/sha1_name.c
index 709ff2eee64cf106191ad274bede82a95d00e2a3..faea58dc8c27de23e8fbaff17b39cb9e57708510 100644 (file)
--- a/sha1_name.c
+++ b/sha1_name.c
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++;