From: Johannes Schindelin <Johannes.Schindelin@gmx.de>
To: "Shawn O. Pearce" <spearce@spearce.org>
Cc: Junio C Hamano <junkio@cox.net>, git@vger.kernel.org
Subject: Re: [PATCH] Remove uncontested renamed files during merge.
Date: Wed, 13 Dec 2006 11:31:25 +0100 (CET) [thread overview]
Message-ID: <Pine.LNX.4.63.0612131129550.3635@wbgn013.biozentrum.uni-wuerzburg.de> (raw)
In-Reply-To: <20061213095540.GA25001@spearce.org>
Hi,
On Wed, 13 Dec 2006, Shawn O. Pearce wrote:
> Prior to 65ac6e9c3f47807cb603af07a6a9e1a43bc119ae we deleted a
> file from the working directory during a merge if the file existed
> in the working directory before the merge started but was renamed
> by the branch which is being merged in. This broke in 65ac63 as
> git-merge-recursive did not actually update the working directory
> on this uncontested rename case.
>
> [...]
>
> diff --git a/merge-recursive.c b/merge-recursive.c
> index 9d53bcd..741d17f 100644
> --- a/merge-recursive.c
> +++ b/merge-recursive.c
> @@ -873,7 +873,7 @@ static int process_renames(struct path_list *a_renames,
> struct diff_filespec src_other, dst_other;
> int try_merge, stage = a_renames == renames1 ? 3: 2;
>
> - remove_file(1, ren1_src, 1);
> + remove_file(1, ren1_src, 0);
I _think_ that the "0" should be "!index_only". After all, these functions
are not only called on the virtual merges, but also on the final merge,
which indeed should update the working directory. And since it is a
rename, the old file has to go.
Ciao,
next prev parent reply other threads:[~2006-12-13 10:31 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-12-13 9:55 [PATCH] Remove uncontested renamed files during merge Shawn O. Pearce
2006-12-13 10:31 ` Johannes Schindelin [this message]
2006-12-13 10:42 ` Shawn Pearce
2006-12-13 10:45 ` Johannes Schindelin
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=Pine.LNX.4.63.0612131129550.3635@wbgn013.biozentrum.uni-wuerzburg.de \
--to=johannes.schindelin@gmx.de \
--cc=git@vger.kernel.org \
--cc=junkio@cox.net \
--cc=spearce@spearce.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).