describe: do not silently ignore indescribable commits
authorJunio C Hamano <junkio@cox.net>
Wed, 11 Jan 2006 21:41:25 +0000 (13:41 -0800)
committerJunio C Hamano <junkio@cox.net>
Wed, 11 Jan 2006 21:41:25 +0000 (13:41 -0800)
We silently ignored indescribable commits without complaining.
Complain and die instead.

Signed-off-by: Junio C Hamano <junkio@cox.net>
describe.c

index a0180f5..5548a16 100644 (file)
@@ -124,10 +124,11 @@ static void describe(struct commit *cmit)
                if (n) {
                        printf("%s-g%s\n", n->path,
                               find_unique_abbrev(cmit->object.sha1, abbrev));
-                       break;
+                       clear_commit_marks(cmit, SEEN);
+                       return;
                }
        }
-       clear_commit_marks(cmit, SEEN);
+       die("cannot describe '%s'", sha1_to_hex(cmit->object.sha1));
 }
 
 int main(int argc, char **argv)