Skip to content

Commit

Permalink
Let --decorate show HEAD position
Browse files Browse the repository at this point in the history
'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>
  • Loading branch information
Thomas Rast authored and Junio C Hamano committed Oct 12, 2009
1 parent 17225c4 commit 77abcbd
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 2 deletions.
1 change: 1 addition & 0 deletions log-tree.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
}

Expand Down
2 changes: 1 addition & 1 deletion t/t4013/diff.log_--decorate=full_--all
Original file line number Diff line number Diff line change
@@ -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
Expand Down
2 changes: 1 addition & 1 deletion t/t4013/diff.log_--decorate_--all
Original file line number Diff line number Diff line change
@@ -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
Expand Down

0 comments on commit 77abcbd

Please sign in to comment.