summaryrefslogtreecommitdiff
path: root/cache.h
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2016-10-27 21:58:47 (GMT)
committerJunio C Hamano <gitster@pobox.com>2016-10-27 21:58:47 (GMT)
commit580d820ece78100c5e2b8b5874d7aed5d76715f2 (patch)
tree5429c7137041134b69cd26ad10cd79e1416cc0a8 /cache.h
parent2cc2e70264e0fcba04f9ef791d144bbc8b501206 (diff)
parente6c587c733b4634030b353f4024794b08bc86892 (diff)
downloadgit-580d820ece78100c5e2b8b5874d7aed5d76715f2.zip
git-580d820ece78100c5e2b8b5874d7aed5d76715f2.tar.gz
git-580d820ece78100c5e2b8b5874d7aed5d76715f2.tar.bz2
Merge branch 'lt/abbrev-auto'
Allow the default abbreviation length, which has historically been 7, to scale as the repository grows. The logic suggests to use 12 hexdigits for the Linux kernel, and 9 to 10 for Git itself. * lt/abbrev-auto: abbrev: auto size the default abbreviation abbrev: prepare for new world order abbrev: add FALLBACK_DEFAULT_ABBREV to prepare for auto sizing
Diffstat (limited to 'cache.h')
-rw-r--r--cache.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/cache.h b/cache.h
index f7ee414..446d4cb 100644
--- a/cache.h
+++ b/cache.h
@@ -1190,6 +1190,9 @@ static inline int hex2chr(const char *s)
#define MINIMUM_ABBREV minimum_abbrev
#define DEFAULT_ABBREV default_abbrev
+/* used when the code does not know or care what the default abbrev is */
+#define FALLBACK_DEFAULT_ABBREV 7
+
struct object_context {
unsigned char tree[20];
char path[PATH_MAX];
@@ -1208,6 +1211,7 @@ struct object_context {
#define GET_SHA1_TREEISH 020
#define GET_SHA1_BLOB 040
#define GET_SHA1_FOLLOW_SYMLINKS 0100
+#define GET_SHA1_AUTOMATIC 0200
#define GET_SHA1_ONLY_TO_DIE 04000
#define GET_SHA1_DISAMBIGUATORS \