git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Junio C Hamano <gitster@pobox.com>
To: "David D. Kilzer" <ddkilzer@kilzer.net>
Cc: git@vger.kernel.org, Johannes Schindelin <johannes.schindelin@gmx.de>
Subject: Re: [PATCH] 3-way merge with file move fails when diff.renames = copies
Date: Mon, 10 Nov 2008 16:15:49 -0800	[thread overview]
Message-ID: <7vwsfb2k3u.fsf@gitster.siamese.dyndns.org> (raw)
In-Reply-To: <7v63mv3zww.fsf@gitster.siamese.dyndns.org> (Junio C. Hamano's message of "Mon, 10 Nov 2008 15:49:03 -0800")

Junio C Hamano <gitster@pobox.com> writes:

> "David D. Kilzer" <ddkilzer@kilzer.net> writes:
>
>> With diff.renames = copies, a 3-way merge (e.g. "git rebase") would
>> fail with the following error:

By the way, I think the real issue with this one is that we currently do
not disable diff.renames configuration while rebase internally runs
"format-patch" to feed "am -3".

The end user configuration for "diff" should not affect the result
produced by the higher level command that is related to "diff" only
because internally it is implemented in terms of it.

For that matter, I have a feeling that format-patch should not even look
at diff.renames, but we seem to have been doing this for a long time so
there is no easy way to fix this thinko.

In any case, here is a much straightforward fix for "rebase".  

Running "am -3" on a copying patch would still need a patch to the
index-info codepath, and my earlier comment on it still stands, but it is
irrelevant/orthogonal to your particular test script.

 git-rebase.sh |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git c/git-rebase.sh w/git-rebase.sh
index 023a6dc..159ccb3 100755
--- c/git-rebase.sh
+++ w/git-rebase.sh
@@ -429,7 +429,7 @@ fi
 if test -z "$do_merge"
 then
 	git format-patch -k --stdout --full-index --ignore-if-in-upstream \
-		"$upstream..$orig_head" |
+		--no-renames "$upstream..$orig_head" |
 	git am $git_am_opt --rebasing --resolvemsg="$RESOLVEMSG" &&
 	move_to_original_branch
 	ret=$?

  parent reply	other threads:[~2008-11-11  0:17 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-11-10 22:26 [PATCH] 3-way merge with file move fails when diff.renames = copies David D. Kilzer
2008-11-10 23:41 ` Johannes Schindelin
2008-11-10 23:53   ` [PATCH] Fix 3-way merge with file move " David D. Kilzer
2008-11-10 23:49 ` [PATCH] 3-way merge with file move fails " Junio C Hamano
2008-11-11  0:06   ` David D. Kilzer
2008-11-11  0:15   ` Junio C Hamano [this message]
2010-07-21 19:58     ` [PATCH] Fix rebase with file move " David D. Kilzer
2010-07-21 21:54       ` Junio C Hamano
2010-07-22  0:22         ` David D. Kilzer
2010-07-22  7:51       ` Jonathan Nieder
2010-07-22 21:59         ` David D. Kilzer
2010-07-23 17:01           ` [PATCH 0/5] " Jonathan Nieder
2010-07-23 17:03             ` [PATCH 1/5] t4150 (am): style tweaks Jonathan Nieder
2010-07-23 17:04             ` [PATCH 2/5] t4150 (am): futureproof against failing tests Jonathan Nieder
2010-07-23 17:04             ` [PATCH 3/5] Teach "apply --index-info" to handle rename patches Jonathan Nieder
2010-07-23 17:05             ` [PATCH 4/5] t3400 (rebase): whitespace cleanup Jonathan Nieder
2010-07-23 17:06             ` [PATCH 5/5] rebase: protect against diff.renames configuration Jonathan Nieder
2010-07-23 19:51               ` Sverre Rabbelier
2010-07-23 21:03                 ` Junio C Hamano
2010-07-23 19:53               ` Sverre Rabbelier
2010-07-23 18:47             ` [PATCH 0/5] Fix rebase with file move when diff.renames = copies David D. Kilzer
2010-07-24 21:59               ` Jonathan Nieder

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

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=7vwsfb2k3u.fsf@gitster.siamese.dyndns.org \
    --to=gitster@pobox.com \
    --cc=ddkilzer@kilzer.net \
    --cc=git@vger.kernel.org \
    --cc=johannes.schindelin@gmx.de \
    /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.
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 NNTP newsgroup(s).