From: Junio C Hamano <gitster@pobox.com>
To: Michael J Gruber <git@drmicha.warpmail.net>
Cc: git@vger.kernel.org
Subject: Re: [PATCH] git diff -D: omit the preimage of deletes
Date: Fri, 01 Apr 2011 12:26:28 -0700 [thread overview]
Message-ID: <7vbp0pg4d7.fsf@alter.siamese.dyndns.org> (raw)
In-Reply-To: <b6975fdc80a338e47c1426e8bf8450b68130b84a.1301664623.git.git@drmicha.warpmail.net> (Michael J. Gruber's message of "Fri, 1 Apr 2011 15:31:38 +0200")
Michael J Gruber <git@drmicha.warpmail.net> writes:
> 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.
next prev parent reply other threads:[~2011-04-01 19:26 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-03-31 22:26 What's cooking in git.git (Mar 2011, #06; Thu, 31) Junio C Hamano
2011-03-31 22:35 ` Let's make our cycles shorter Junio C Hamano
2011-04-25 0:34 ` Sebastien Douche
2011-04-25 17:03 ` Junio C Hamano
2011-06-13 0:45 ` Sebastien Douche
2011-04-01 13:31 ` [PATCH] git diff -D: omit the preimage of deletes Michael J Gruber
2011-04-01 19:26 ` Junio C Hamano [this message]
2011-04-03 6:23 ` Junio C Hamano
2011-04-03 6:38 ` Junio C Hamano
2011-04-03 12:51 ` Michael J Gruber
2011-04-01 15:26 ` What's cooking in git.git (Mar 2011, #06; Thu, 31) Jeff King
2011-04-01 17:01 ` Junio C Hamano
2011-04-01 17:06 ` Jeff King
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
List information: http://vger.kernel.org/majordomo-info.html
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=7vbp0pg4d7.fsf@alter.siamese.dyndns.org \
--to=gitster@pobox.com \
--cc=git@drmicha.warpmail.net \
--cc=git@vger.kernel.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.
Code repositories for project(s) associated with this public inbox
https://80x24.org/mirrors/git.git
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 read-only IMAP folder(s) and NNTP newsgroup(s).