From: Nicolas Pitre <nico@cam.org>
To: Linus Torvalds <torvalds@osdl.org>
Cc: git@vger.kernel.org
Subject: [PATCH] show changed tree objects with recursive git-diff-tree
Date: Fri, 20 May 2005 21:40:41 -0400 (EDT) [thread overview]
Message-ID: <Pine.LNX.4.62.0505202131520.4397@localhost.localdomain> (raw)
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.
next reply other threads:[~2005-05-21 1:40 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-05-21 1:40 Nicolas Pitre [this message]
2005-05-21 2:11 ` [PATCH] show changed tree objects with recursive git-diff-tree 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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=Pine.LNX.4.62.0505202131520.4397@localhost.localdomain \
--to=nico@cam.org \
--cc=git@vger.kernel.org \
--cc=torvalds@osdl.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).