git.99rst.org
/
git.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
| inline |
side by side
(parent:
635d413
)
git-describe: use find_unique_abbrev()
author
Junio C Hamano
<redacted>
Tue, 27 Dec 2005 22:49:22 +0000
(14:49 -0800)
committer
Junio C Hamano
<redacted>
Wed, 28 Dec 2005 01:57:27 +0000
(17:57 -0800)
Just in case 8 hexadecimal digits are not enough. We could use
shorter default if we wanted to.
Signed-off-by: Junio C Hamano <redacted>
describe.c
patch
|
blob
|
history
diff --git
a/describe.c
b/describe.c
index e1b6588c9b8d0bd70702a56e182b2352dacc4386..ba49d0027092393a6b0b578dafdbfef15f791eaf 100644
(file)
--- a/
describe.c
+++ b/
describe.c
@@
-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;
}
}
git clone https://git.99rst.org/PROJECT