Re: What's cooking in git.git (Jun 2010, #04; Wed, 23)

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

 



On 24. juni 2010, at 13.42, Johannes Sixt wrote:

> Am 6/24/2010 13:17, schrieb Finn Arne Gangstad:
>> Assume you start out with a repo that has a lot of text files with
>> CRLF checked in (A).
>> 
>>  C----
>> /     \
>> A---B---D
>> 
>> B: Add "* text=auto" to .gitattributes and normalize all files to LF
>> only in repo
>> 
>> D: try to merge C
>> 
>> Without this patch you will get a ridiculous number of lf/crlf
>> conflicts when trying to merge C into D, since the repository contents
>> for C are "wrong" wrt the new .gitattributes file.
> 
> What should happen when you have C checked out (i.e., you do not yet have
> the updated .gitattributes in your worktree nor index) and merge B?
> Currently, you get the identical conflicts, but I suspect that the patch
> does not help in this situation. IOW, it breaks the merge symmetry.

I confess that I didn't expect this to work either, but it does: the merge completes without conflict.  This is even covered in the included test script ("Check merging addition of text=auto").

I've cleaned the patch up a bit and added automatic delete/normalize conflict resolution.  Will submit a new version soon.
-- 
Eyvind Bernhardsen

--
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]