Thread (7 messages) flat view 7 messages, 4 authors, 2021-01-17
STALE2030d

[PATCH 1/2] revision: Denote root commits with '#'

From: Kyle Marek <hidden>
Date: 2021-01-17 12:07:03
Subsystem: the rest · Maintainer: Linus Torvalds

This aids in identifying where an unrelated branch history starts when
using `git log --graph --oneline --all`

Signed-off-by: Kyle Marek <redacted>
---
 revision.c | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/revision.c b/revision.c
index 9dff845bed..8556923de8 100644
--- a/revision.c
+++ b/revision.c
@@ -4191,9 +4191,11 @@ const char *get_revision_mark(const struct rev_info *revs, const struct commit *
 			return "<";
 		else
 			return ">";
-	} else if (revs->graph)
+	} else if (revs->graph) {
+		if (!commit->parents)
+			return "#";
 		return "*";
-	else if (revs->cherry_mark)
+	} else if (revs->cherry_mark)
 		return "+";
 	return "";
 }
-- 
2.29.2
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help