Skip to content

Commit 77abcbd

Browse files
trastgitster
authored andcommitted
Let --decorate show HEAD position
'git log --graph --oneline --decorate --all' is a useful way to get a general overview of the repository state, similar to 'gitk --all'. Let it indicate the position of HEAD by loading that ref too, so that the --decorate code can see it. Signed-off-by: Thomas Rast <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent 17225c4 commit 77abcbd

File tree

3 files changed

+3
-2
lines changed

3 files changed

+3
-2
lines changed

log-tree.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,7 @@ void load_ref_decorations(int flags)
4343
if (!loaded) {
4444
loaded = 1;
4545
for_each_ref(add_ref_decoration, &flags);
46+
head_ref(add_ref_decoration, &flags);
4647
}
4748
}
4849

t/t4013/diff.log_--decorate=full_--all

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

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

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

0 commit comments

Comments
 (0)