mirror of
https://github.com/git/git.git
synced 2024-09-28 00:29:55 +02:00
git-describe: use find_unique_abbrev()
Just in case 8 hexadecimal digits are not enough. We could use shorter default if we wanted to. Signed-off-by: Junio C Hamano <junkio@cox.net>
This commit is contained in:
parent
635d413430
commit
4cdf78bf96
@ -95,7 +95,8 @@ static void describe(struct commit *cmit)
|
||||
struct commit *c = pop_most_recent_commit(&list, SEEN);
|
||||
n = match(c);
|
||||
if (n) {
|
||||
printf("%s-g%.8s\n", n->path, sha1_to_hex(cmit->object.sha1));
|
||||
printf("%s-g%s\n", n->path,
|
||||
find_unique_abbrev(cmit->object.sha1, 8));
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user