From: Michael J Gruber <git@drmicha.warpmail.net>
To: Junio C Hamano <gitster@pobox.com>
Cc: git@vger.kernel.org
Subject: Re: [PATCH] git diff -D: omit the preimage of deletes
Date: Sun, 03 Apr 2011 14:51:23 +0200 [thread overview]
Message-ID: <4D986D4B.80208@drmicha.warpmail.net> (raw)
In-Reply-To: <7vbp0pg4d7.fsf@alter.siamese.dyndns.org>
Junio C Hamano venit, vidit, dixit 01.04.2011 21:26:
> 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.
>
I think I misunderstood what you intended "-B -D" to do (and I even
didn't know about -B until -D came up; my understanding of "-B" is still
fishy). I just didn't want to let this die before 1.7.5. Thanks for
taking this up and clarifying it.
Michael
next prev parent reply other threads:[~2011-04-03 12:51 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
2011-04-03 6:23 ` Junio C Hamano
2011-04-03 6:38 ` Junio C Hamano
2011-04-03 12:51 ` Michael J Gruber [this message]
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=4D986D4B.80208@drmicha.warpmail.net \
--to=git@drmicha.warpmail.net \
--cc=git@vger.kernel.org \
--cc=gitster@pobox.com \
/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).