git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] show changed tree objects with recursive git-diff-tree
@ 2005-05-21  1:40 Nicolas Pitre
  2005-05-21  2:11 ` Junio C Hamano
  2005-05-21  3:20 ` Linus Torvalds
  0 siblings, 2 replies; 9+ messages in thread
From: Nicolas Pitre @ 2005-05-21  1:40 UTC (permalink / raw)
  To: Linus Torvalds; +Cc: git

When -p is not used, git-diff-tree currently shows changed tree objects
but only when not recursive.  This patch makes the recursive output
show tree objects as well.

This has the immediate benefit of making git-deltafy-script handle
deltafication of tree objects.

Signed-off-by: Nicolas Pitre <nico@cam.org>

diff --git a/diff-tree.c b/diff-tree.c
--- a/diff-tree.c
+++ b/diff-tree.c
@@ -131,7 +131,10 @@ static int compare_tree_entry(void *tree
 
 	if (recursive && S_ISDIR(mode1)) {
 		int retval;
-		char *newbase = malloc_base(base, path1, pathlen1);
+		char *newbase;
+		if (!silent && !generate_patch)
+			diff_change(mode1, mode2, sha1, sha2, base, path1);
+		newbase = malloc_base(base, path1, pathlen1);
 		retval = diff_tree_sha1(sha1, sha2, newbase);
 		free(newbase);
 		return retval;
diff --git a/git-deltafy-script b/git-deltafy-script
--- a/git-deltafy-script
+++ b/git-deltafy-script
@@ -9,8 +9,6 @@
 # NOTE: the "best earlier version" is not implemented in mkdelta yet
 #       and therefore only the next eariler version is used at this time.
 #
-# TODO: deltafy tree objects as well.
-#
 # The -d argument allows to provide a limit on the delta chain depth.
 # If 0 is passed then everything is undeltafied.
 

^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2005-05-25 19:17 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-05-21  1:40 [PATCH] show changed tree objects with recursive git-diff-tree Nicolas Pitre
2005-05-21  2:11 ` Junio C Hamano
2005-05-21  3:34   ` Linus Torvalds
2005-05-23 21:49     ` Nicolas Pitre
2005-05-25  6:24       ` Junio C Hamano
2005-05-25 13:38         ` Nicolas Pitre
2005-05-25 19:18           ` Junio C Hamano
2005-05-21  3:20 ` Linus Torvalds
2005-05-21  3:47   ` Junio C Hamano

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).