]> Pileus Git - ~andy/git/commitdiff
Let --decorate show HEAD position
authorThomas Rast <trast@student.ethz.ch>
Mon, 12 Oct 2009 20:34:12 +0000 (22:34 +0200)
committerJunio C Hamano <gitster@pobox.com>
Mon, 12 Oct 2009 23:22:35 +0000 (16:22 -0700)
'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>
log-tree.c
t/t4013/diff.log_--decorate=full_--all
t/t4013/diff.log_--decorate_--all

index 1618f3c79a3095ab88553d9ca71ce0c4024c6b97..f7d54f2f1b132d54adda6a9ca5f8e1332856709f 100644 (file)
@@ -43,6 +43,7 @@ void load_ref_decorations(int flags)
        if (!loaded) {
                loaded = 1;
                for_each_ref(add_ref_decoration, &flags);
+               head_ref(add_ref_decoration, &flags);
        }
 }
 
index 903d9d96595243b83d102004869e18f4df1ea3bb..d155e0bab29000a99eb797681450be1174185846 100644 (file)
@@ -1,5 +1,5 @@
 $ git log --decorate=full --all
-commit 59d314ad6f356dd08601a4cd5e530381da3e3c64 (refs/heads/master)
+commit 59d314ad6f356dd08601a4cd5e530381da3e3c64 (HEAD, refs/heads/master)
 Merge: 9a6d494 c7a2ab9
 Author: A U Thor <author@example.com>
 Date:   Mon Jun 26 00:04:00 2006 +0000
index 954210ea907cb04f6113d82194c0753019270d8a..fd7c3e64396b4ea57c3b03d2e120580205263462 100644 (file)
@@ -1,5 +1,5 @@
 $ git log --decorate --all
-commit 59d314ad6f356dd08601a4cd5e530381da3e3c64 (master)
+commit 59d314ad6f356dd08601a4cd5e530381da3e3c64 (HEAD, master)
 Merge: 9a6d494 c7a2ab9
 Author: A U Thor <author@example.com>
 Date:   Mon Jun 26 00:04:00 2006 +0000