diff options
author | Junio C Hamano <junkio@cox.net> | 2005-06-19 13:14:05 -0700 |
---|---|---|
committer | Linus Torvalds <torvalds@ppc970.osdl.org> | 2005-06-19 20:13:18 -0700 |
commit | 4727f640036fbdad414bdcbe31d08f6a8fd70923 (patch) | |
tree | 5458d4661aed71ae5864f663f636cf9707e43e9e /diff-tree.c | |
parent | 170241b7d1437e082c13a6f6b812eb827a7d48e0 (diff) | |
download | git-4727f640036fbdad414bdcbe31d08f6a8fd70923.tar.gz git-4727f640036fbdad414bdcbe31d08f6a8fd70923.tar.xz |
[PATCH] Make -C less eager.
Like diff-tree, this patch makes -C option for diff-* brothers
to use only pre-image of modified files as rename/copy detection
by default. Give --find-copies-harder to use unmodified files
to find copies from as well.
This also fixes "diff-files -C" problem earlier noticed by
Linus. It was feeding the null sha1 even when the file in the
work tree was known to match what is in the index file. This
resulted in diff-files showing everything in the project.
Signed-off-by: Junio C Hamano <junkio@cox.net>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'diff-tree.c')
-rw-r--r-- | diff-tree.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/diff-tree.c b/diff-tree.c index 207571535..7446e09af 100644 --- a/diff-tree.c +++ b/diff-tree.c @@ -201,7 +201,7 @@ static int interesting(void *tree, unsigned long size, const char *base) static void show_tree(const char *prefix, void *tree, unsigned long size, const char *base) { while (size) { - if (find_copies_harder || interesting(tree, size, base)) + if (interesting(tree, size, base)) show_file(prefix, tree, size, base); update_tree_entry(&tree, &size); } @@ -269,7 +269,7 @@ static void call_diff_setup(void) static int call_diff_flush(void) { - diffcore_std(find_copies_harder ? paths : 0, + diffcore_std(NULL, detect_rename, diff_score_opt, pickaxe, pickaxe_opts, diff_break_opt, @@ -401,7 +401,7 @@ static int diff_tree_stdin(char *line) } static char *diff_tree_usage = -"git-diff-tree [-p] [-r] [-z] [--stdin] [-M] [-C] [-R] [-S<string>] [-O<orderfile>] [-m] [-s] [-v] [--pretty] [-t] <tree-ish> <tree-ish>"; +"git-diff-tree [-p] [-r] [-z] [--stdin] [-m] [-s] [-v] [--pretty] [-t] [-R] [-B] [-M] [-C] [--find-copies-header] [-O<orderfile>] [-S<string>] [--pickaxe-all] <tree-ish> <tree-ish>"; static enum cmit_fmt get_commit_format(const char *arg) { |