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

Re: [Q] Abbreviated history graph?

From
Linus Torvalds <torvalds@linux-foundation.org>
Date
Nov 3, 2008, 20:34 UTC
Message-ID
<alpine.LFD.2.00.0811031233430.3419@nehalem.linux-foundation.org>
In-Reply-To
<alpine.LFD.2.00.0811031211180.3419@nehalem.linux-foundation.org>
On Mon, 3 Nov 2008, Linus Torvalds wrote:
Show 11 quoted lines
> 
> Side note: it's certainly possible that we could improve on this. Right 
> now, "--simplify-namespace" will totally override any path simplification, 
> so you can't get a combination of pathnames _and_ naming commits. I don't 
> know exactly what the rules should be, but I could imagine that we could 
> do something like:
> 
>  - if no pathnames are given, work the way the current patch-series works.
> 
>  - if path-names are given, make rev_compare_tree() truen 
>    REV_TREE_DIFFERENT if a name decoration _or_ a tree difference exists.
The incremental diff to do this would be something like the appended.
		Linus
---
 revision.c |    5 ++++-
 1 files changed, 4 insertions(+), 1 deletions(-)
diff --git a/revision.c b/revision.c
index b48e626..1b716c7 100644
--- a/revision.c
+++ b/revision.c
@@ -311,7 +311,10 @@ static int rev_compare_tree(struct rev_info *revs, struct commit *parent, struct
 	if (revs->simplify_namespace) {
 		struct name_decoration *name;
 		name = lookup_decoration(&name_decoration, &commit->object);
-		return name ? REV_TREE_DIFFERENT : REV_TREE_SAME;
+		if (name)
+			return REV_TREE_DIFFERENT;
+		if (!revs->prune_data)
+			return REV_TREE_SAME;
 	}
 	if (!t2)
 		return REV_TREE_DIFFERENT;
Previous: Linus TorvaldsNext: Junio C Hamano
Message 17 of 18 in “[Q] Abbreviated history graph?”
  1. Brian FosterNov 3, 2008
  2. Santi BéjarNov 3, 2008
  3. Santi BéjarNov 3, 2008
  4. Brian FosterNov 3, 2008
  5. Santi BéjarNov 3, 2008
  6. Linus TorvaldsNov 3, 2008
  7. 1/4 Add a 'source' decorator for commitsLinus Torvalds, Nov 3, 2008
  8. 2/4 revision: make tree comparison functions take commits rather than treesLinus Torvalds, Nov 3, 2008
  9. 3/4 Make '--decorate' set an explicit 'show_decorations' flagLinus Torvalds, Nov 3, 2008
  10. 4/4 Add support for 'namespace' history simplificationLinus Torvalds, Nov 3, 2008
  11. Santi BéjarNov 3, 2008
  12. Linus TorvaldsNov 3, 2008
  13. Santi BéjarNov 3, 2008
  14. Robin RosenbergNov 3, 2008
  15. Clemens BuchacherNov 4, 2008
  16. Linus TorvaldsNov 3, 2008
  17. Linus TorvaldsNov 3, 2008
  18. Junio C HamanoNov 4, 2008

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.