sha1_name.c: allow get_short_sha1() to take other flags

Instead of a separate "int quietly" argument, make it take "unsigned
flags" so that we can pass other options to it.

The bit assignment of this flag word is exposed in cache.h because
the mechanism will be exposed to callers of the higher layer in
later commits in this series.

Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:
Junio C Hamano
2012-06-18 11:32:03 -07:00
parent c005e98612
commit 37c00e5590
2 changed files with 6 additions and 3 deletions

View File

@ -811,6 +811,8 @@ struct object_context {
unsigned mode;
};
#define GET_SHA1_QUIETLY 01
extern int get_sha1(const char *str, unsigned char *sha1);
extern void maybe_die_on_misspelt_object_name(const char *name, const char *prefix);
extern int get_sha1_with_context(const char *str, unsigned char *sha1, struct object_context *orc);