Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.kernel.org/pub/scm/git/git.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2011-03-11 09:45:49 +0300
committerJunio C Hamano <gitster@pobox.com>2011-03-11 09:45:49 +0300
commitadfe4e1ff2c296184856bf55636be845f96b55e5 (patch)
treeca672bed6ea60d2b3fdc9454f75b03e52472063c
parent83c3c6222a2331042c973a991572eafa37f25d1d (diff)
parentea2c69ed4728070be1d2ee953a6948398b859150 (diff)
Merge branch 'maint'
* maint: Revert "core.abbrevguard: Ensure short object names stay unique a bit longer"
-rw-r--r--Documentation/config.txt9
-rw-r--r--cache.h1
-rw-r--r--config.c7
-rw-r--r--environment.c1
-rw-r--r--sha1_name.c4
5 files changed, 1 insertions, 21 deletions
diff --git a/Documentation/config.txt b/Documentation/config.txt
index c995a1a47b..701fba92dc 100644
--- a/Documentation/config.txt
+++ b/Documentation/config.txt
@@ -376,15 +376,6 @@ core.warnAmbiguousRefs::
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,
diff --git a/cache.h b/cache.h
index 08a902210c..d0bbc9120e 100644
--- a/cache.h
+++ b/cache.h
@@ -560,7 +560,6 @@ extern int assume_unchanged;
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 31f778b5e8..b94de8f51c 100644
--- a/config.c
+++ b/config.c
@@ -499,13 +499,6 @@ static int git_default_core_config(const char *var, const char *value)
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 9564475f42..c3efbb9608 100644
--- a/environment.c
+++ b/environment.c
@@ -21,7 +21,6 @@ int prefer_symlink_refs;
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 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++;