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 <trast@student.ethz.ch> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Thomas Rast committed
Oct 12, 2009 at 22:34 UTC
77abcbdc268d048b7a19af405607fb8d14e630ed
3 files changed
+3
-2
log-tree.c
+1
@@ -43,6 +43,7 @@ void load_ref_decorations(int flags)
43
if (!loaded) {
44
loaded = 1;
45
for_each_ref(add_ref_decoration, &flags);
46
+ head_ref(add_ref_decoration, &flags);
47
}
48
}
49
t/t4013/diff.log_--decorate=full_--all
+1
-1
@@ -1,5 +1,5 @@
1
$ git log --decorate=full --all
2
-commit 59d314ad6f356dd08601a4cd5e530381da3e3c64 (refs/heads/master)
2
+commit 59d314ad6f356dd08601a4cd5e530381da3e3c64 (HEAD, refs/heads/master)
3
Merge: 9a6d494 c7a2ab9
4
Author: A U Thor <author@example.com>
5
Date: Mon Jun 26 00:04:00 2006 +0000
t/t4013/diff.log_--decorate_--all
+1
-1
@@ -1,5 +1,5 @@
1
$ git log --decorate --all
2
-commit 59d314ad6f356dd08601a4cd5e530381da3e3c64 (master)
2
+commit 59d314ad6f356dd08601a4cd5e530381da3e3c64 (HEAD, master)
3
Merge: 9a6d494 c7a2ab9
4
Author: A U Thor <author@example.com>
5
Date: Mon Jun 26 00:04:00 2006 +0000