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

Re: Gitk strangeness..

From
Junio C Hamano <junkio@cox.net>
Date
Mar 28, 2006, 02:54 UTC
Message-ID
<7vr74nmg7e.fsf@assigned-by-dhcp.cox.net>
In-Reply-To
<17448.40941.256361.866229@cargo.ozlabs.ibm.com>
Paul Mackerras <paulus@samba.org> writes:
> The other option would be to make git-rev-list list the open-circle
> commits explicitly, with an indication that they are not in the
> requested set but are parents of commits in the requested set.

I might be off the mark, but are you thinking about something like the attached patch?

> Do you think that having the open-circle commits in the graph is
> useful?
Of course.

-- >8 -- rev-list: --parents-with-boundary

The new flag acts like --parents, but uninteresting parents are marked by prefied '-' sign.

        $ git-rev-list --parents-with-boundary HEAD^^..HEAD
        acb7257... 9c48666...
        9c48666... -dff86e2..
---
diff --git a/rev-list.c b/rev-list.c
index 441c437..58fc449 100644
--- a/rev-list.c
+++ b/rev-list.c
@@ -39,6 +39,8 @@
 static int bisect_list = 0;
 static int verbose_header = 0;
 static int abbrev = DEFAULT_ABBREV;
+#define SHOW_PARENTS 1
+#define SHOW_PARENTS_BOUNDARY 2
 static int show_parents = 0;
 static int show_timestamp = 0;
 static int hdr_termination = 0;
@@ -59,7 +61,11 @@
 			parents = parents->next;
 			if (o->flags & TMP_MARK)
 				continue;
-			printf(" %s", sha1_to_hex(o->sha1));
+			if (show_parents == SHOW_PARENTS_BOUNDARY &&
+			    o->flags & UNINTERESTING)
+				printf(" -%s", sha1_to_hex(o->sha1));
+			else
+				printf(" %s", sha1_to_hex(o->sha1));
 			o->flags |= TMP_MARK;
 		}
 		/* TMP_MARK is a general purpose flag that can
@@ -337,7 +343,11 @@
 			continue;
 		}
 		if (!strcmp(arg, "--parents")) {
-			show_parents = 1;
+			show_parents = SHOW_PARENTS;
+			continue;
+		}
+		if (!strcmp(arg, "--parents-with-boundary")) {
+			show_parents = SHOW_PARENTS_BOUNDARY;
 			continue;
 		}
 		if (!strcmp(arg, "--timestamp")) {
Previous: Linus TorvaldsNext: Paul Mackerras
Message 20 of 33 in “What's in git.git”
  1. Junio C HamanoMar 28, 2006
  2. Add ALL_LDFLAGS to the git target.Jason Riedy, Mar 28, 2006
  3. Junio C HamanoMar 28, 2006
  4. Jason RiedyMar 28, 2006
  5. Junio C HamanoMar 28, 2006
  6. Jason RiedyMar 28, 2006
  7. Mark WoodingMar 28, 2006
  8. Linus TorvaldsMar 28, 2006
  9. Junio C HamanoMar 28, 2006
  10. Jason RiedyMar 28, 2006
  11. Junio C HamanoMar 29, 2006
  12. Mark WoodingMar 28, 2006
  13. Support for pickaxe matching regular expressionsPetr Baudis, Mar 29, 2006
  14. Johannes SchindelinMar 29, 2006
  15. Petr BaudisMar 29, 2006
  16. Gitk strangeness..Linus Torvalds, Mar 28, 2006
  17. Junio C HamanoMar 28, 2006
  18. Paul MackerrasMar 28, 2006
  19. Linus TorvaldsMar 28, 2006
  20. Junio C HamanoMar 28, 2006
  21. Paul MackerrasMar 28, 2006
  22. Junio C HamanoMar 28, 2006
  23. Paul MackerrasMar 28, 2006
  24. Junio C HamanoMar 28, 2006
  25. Paul MackerrasMar 28, 2006
  26. Junio C HamanoMar 29, 2006
  27. Junio C HamanoMar 29, 2006
  28. Alex RiesenMar 30, 2006
  29. Paul MackerrasMar 30, 2006
  30. Paul MackerrasMar 30, 2006
  31. Junio C HamanoMar 31, 2006
  32. Alex RiesenMar 31, 2006
  33. Linus TorvaldsMar 28, 2006

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.