Re: [PATCH] Remove uncontested renamed files during merge.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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,
Dscho
-
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]