From: Johannes Schindelin Date: Wed, 20 Sep 2006 21:25:07 GMT Subject: [PATCH] describe: fall back to 'HEAD' if no appropriate tag exists Message-ID: Now, if no tag exists to say something like '-gfffffff', say 'HEAD-gfffffff' instead of erroring out. Signed-off-by: Johannes Schindelin --- describe.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/describe.c b/describe.c index ab192f8..8b08a3f 100644 --- a/describe.c +++ b/describe.c @@ -136,7 +136,7 @@ static void describe(const char *arg, in return; } } - die("cannot describe '%s'", sha1_to_hex(cmit->object.sha1)); + printf("HEAD-g%s\n", find_unique_abbrev(cmit->object.sha1, abbrev)); } int main(int argc, char **argv) -- 1.4.2.1.ga0df5-dirty