Skip to content

Commit 8c23b6f

Browse files
author
Junio C Hamano
committed
describe: do not silently ignore indescribable commits
We silently ignored indescribable commits without complaining. Complain and die instead. Signed-off-by: Junio C Hamano <junkio@cox.net>
1 parent 5a25b4a commit 8c23b6f

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

describe.c

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -124,10 +124,11 @@ static void describe(struct commit *cmit)
124124
if (n) {
125125
printf("%s-g%s\n", n->path,
126126
find_unique_abbrev(cmit->object.sha1, abbrev));
127-
break;
127+
clear_commit_marks(cmit, SEEN);
128+
return;
128129
}
129130
}
130-
clear_commit_marks(cmit, SEEN);
131+
die("cannot describe '%s'", sha1_to_hex(cmit->object.sha1));
131132
}
132133

133134
int main(int argc, char **argv)

0 commit comments

Comments
 (0)