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>2012-06-21 10:03:09 +0400
committerJunio C Hamano <gitster@pobox.com>2012-07-03 22:17:59 +0400
commitaa1dec9ef6ff184792520eb4539af1555c01604c (patch)
tree57f7ce140695ba2f9f6ce28f3674a204a899c9de /cache.h
parent37c00e5590605c9d3ba76b6c9d7a94ac0356f703 (diff)
sha1_name.c: teach get_short_sha1() a commit-only option
When the caller knows that the parameter is meant to name a commit, e.g. "56789a" in describe name "v1.2.3-4-g56789a", pass that as a hint so that lower level can use it to disambiguate objects when there is only one commit whose name begins with 56789a even if there are objects of other types whose names share the same prefix. Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'cache.h')
-rw-r--r--cache.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/cache.h b/cache.h
index 1bafa45a7e..2d91dbd958 100644
--- a/cache.h
+++ b/cache.h
@@ -812,6 +812,7 @@ struct object_context {
};
#define GET_SHA1_QUIETLY 01
+#define GET_SHA1_COMMIT 02
extern int get_sha1(const char *str, unsigned char *sha1);
extern void maybe_die_on_misspelt_object_name(const char *name, const char *prefix);