git/list[1] front-page[2] threads[3] people[4] search[5] about
 

[PATCH] Let --decorate show HEAD position

From
Thomas Rast <trast@student.ethz.ch>
Date
Oct 12, 2009, 09:01 UTC
Message-ID
<4c70c935ab67266684aa14e38e276795cf1776db.1255337211.git.trast@student.ethz.ch>

'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>
---
 log-tree.c |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)
diff --git a/log-tree.c b/log-tree.c
index 1618f3c..f7d54f2 100644
--- a/log-tree.c
+++ b/log-tree.c
@@ -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);
 	}
 }
 
-- 
1.6.5.59.g76726.dirty
Next: Thomas Rast
Message 1 of 5 in “Let --decorate show HEAD position”
  1. Let --decorate show HEAD positionThomas Rast, Oct 12, 2009
  2. Thomas RastOct 12, 2009
  3. Let --decorate show HEAD positionThomas Rast, Oct 12, 2009
  4. Junio C HamanoOct 12, 2009
  5. Thomas RastOct 12, 2009

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.