Re: Strange effect merging empty file
- From
Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
- Date
- Mar 22, 2012, 12:47 UTC
- Message-ID
- <4F6B1F48.3040007@in.waw.pl>
- In-Reply-To
- <86iphwomnq.fsf@red.stonehenge.com>
On 03/22/2012 01:17 PM, Randal L. Schwartz wrote:
Show 8 quoted lines
>>>>>> "Zbigniew" == Zbigniew Jędrzejewski-Szmek<zbyszek@in.waw.pl> 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