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)
commitd7ae013a3173c621a3556be6834d459ece60e130 (patch)
tree3fc7d1145c484923f1a006a94029d67ffc56a685 /cache.h
parent580d820ece78100c5e2b8b5874d7aed5d76715f2 (diff)
parent8e3f52d77854a19cb3fd2adee40be84c8a8bdacc (diff)
downloadgit-d7ae013a3173c621a3556be6834d459ece60e130.zip
git-d7ae013a3173c621a3556be6834d459ece60e130.tar.gz
git-d7ae013a3173c621a3556be6834d459ece60e130.tar.bz2
Merge branch 'jk/abbrev-auto'
Updates the way approximate count of total objects is computed while attempting to come up with a unique abbreviated object name, which in turn needs to estimate how many hexdigits are necessary to ensure uniqueness. * jk/abbrev-auto: find_unique_abbrev: move logic out of get_short_sha1()
Diffstat (limited to 'cache.h')
-rw-r--r--cache.h7
1 files changed, 6 insertions, 1 deletions
diff --git a/cache.h b/cache.h
index 446d4cb..b7f34b4 100644
--- a/cache.h
+++ b/cache.h
@@ -1211,7 +1211,6 @@ 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 \
@@ -1494,6 +1493,12 @@ extern void prepare_packed_git(void);
extern void reprepare_packed_git(void);
extern void install_packed_git(struct packed_git *pack);
+/*
+ * Give a rough count of objects in the repository. This sacrifices accuracy
+ * for speed.
+ */
+unsigned long approximate_object_count(void);
+
extern struct packed_git *find_sha1_pack(const unsigned char *sha1,
struct packed_git *packs);