Skip to content

Commit de435ac

Browse files
felipecgitster
authored andcommitted
Prettify log decorations even more
"tag: v1.6.2.5" looks much better than "tag: refs/tags/v1.6.2.5". Signed-off-by: Felipe Contreras <[email protected]> Acked-by: Jeff King <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent 4577e48 commit de435ac

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

log-tree.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@ static int add_ref_decoration(const char *refname, const unsigned char *sha1, in
2525
struct object *obj = parse_object(sha1);
2626
if (!obj)
2727
return 0;
28+
refname = prettify_refname(refname);
2829
add_name_decoration("", refname, obj);
2930
while (obj->type == OBJ_TAG) {
3031
obj = ((struct tag *)obj)->tagged;

t/t4013/diff.log_--decorate_--all

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
$ git log --decorate --all
2-
commit 59d314ad6f356dd08601a4cd5e530381da3e3c64 (refs/heads/master)
2+
commit 59d314ad6f356dd08601a4cd5e530381da3e3c64 (master)
33
Merge: 9a6d494 c7a2ab9
44
Author: A U Thor <[email protected]>
55
Date: Mon Jun 26 00:04:00 2006 +0000
66

77
Merge branch 'side'
88

9-
commit c7a2ab9e8eac7b117442a607d5a9b3950ae34d5a (refs/heads/side)
9+
commit c7a2ab9e8eac7b117442a607d5a9b3950ae34d5a (side)
1010
Author: A U Thor <[email protected]>
1111
Date: Mon Jun 26 00:03:00 2006 +0000
1212

@@ -26,7 +26,7 @@ Date: Mon Jun 26 00:01:00 2006 +0000
2626

2727
This is the second commit.
2828

29-
commit 444ac553ac7612cc88969031b02b3767fb8a353a (refs/heads/initial)
29+
commit 444ac553ac7612cc88969031b02b3767fb8a353a (initial)
3030
Author: A U Thor <[email protected]>
3131
Date: Mon Jun 26 00:00:00 2006 +0000
3232

0 commit comments

Comments
 (0)