Junio C Hamano <gitster@xxxxxxxxx> wrote: > -- >8 -- > describe --always: fall back to showing an abbreviated object name ... > diff --git a/builtin-describe.c b/builtin-describe.c > index 05e309f..c1182a3 100644 > --- a/builtin-describe.c > +++ b/builtin-describe.c > @@ -146,6 +147,17 @@ static unsigned long finish_depth_computation( > return seen_commits; > } > > +static void cannot_describe(const unsigned char *sha1) NORETURN; > + > +static void cannot_describe(const unsigned char *sha1) > +{ > + if (always) { > + printf("%s\n", find_unique_abbrev(sha1, DEFAULT_ABBREV)); This should be "abbrev" not "DEFAULT_ABBREV" as then we honor the command line "describe --always --abbrev=16" (for example). > @@ -278,6 +290,8 @@ int cmd_describe(int argc, const char **argv, const char *prefix) > "consider <n> most recent tags (default: 10)"), > OPT_STRING(0, "match", &pattern, "pattern", > "only consider tags matching <pattern>"), > + OPT_BOOLEAN(0, "always", &always, > + "show abbreviated commit object as fallback"), > OPT_END(), > }; Sadly I cannot come up with a better name for this option. :-( -- Shawn. -- To unsubscribe from this list: send the line "unsubscribe git" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html