Re: Strange effect merging empty file

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

 



On 03/22/2012 01:17 PM, Randal L. Schwartz wrote:
"Zbigniew" == Zbigniew Jędrzejewski-Szmek<zbyszek@xxxxxxxxx>  writes:

Zbigniew>  touch .gitignore

If you're doing this to make sure git makes an empty directory, always
put the directory name in there as a comment... that makes it (a) not an
empty file (so merge doesn't get confused) and (b) unique, so when you
change it, merge won't try to change other similar empty files.

Yes, this will indeed fix this particular problem. But in general, empty files can be used for various reasons, and it can be a pretty nasty surprise if they sprout random content as a result of a merge.

Maybe merge-recursive could special-case empty files?

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