Thread (2 messages) flat view 2 messages, 2 authors, 2016-06-15

Re: [PATCH] git diff -D: omit the preimage of deletes

From: Junio C Hamano <hidden>
Date: 2016-06-15 22:50:57

Michael J Gruber [off-list ref] writes:
quoted hunk
diff --git a/diff.c b/diff.c
index 5422c43..9ea1de1 100644
--- a/diff.c
+++ b/diff.c
@@ -4205,7 +4211,7 @@ void diffcore_std(struct diff_options *options)
 			diffcore_break(options->break_opt);
 		if (options->detect_rename)
 			diffcore_rename(options);
-		if (options->break_opt != -1)
+		if (options->break_opt != -1 && !options->irreversible_delete)
 			diffcore_merge_broken();
 	}
 	if (options->pickaxe)
Thanks, but this hunk looks fishy.

What happens to a path that was tentatively broken for the purpose of
rename detection with -B -M (break to match with another file) but then
found to be with no counterpart after all after running diffcore_rename(),
which now needs to get merged back?  Such a path is shown as a normal
patch when the dissimlarity between the preimage and postimage is not
large enough and merge-broken is the step that combines such a broken but
unmatched pair back.

I would have expected that the patch relative to jc/diff-irreversible-delete
topic would consist only of changes to diff.c:emit_rewrite_diff(), docs
and tests.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help