[PATCH] show changed tree objects with recursive git-diff-tree
- From
Nicolas Pitre <nico@cam.org>
- Date
- May 21, 2005, 01:40 UTC
- Message-ID
- <Pine.LNX.4.62.0505202131520.4397@localhost.localdomain>
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.