Re: [PATCH 3/3] t3600: test rm of path with changed leading symlinks

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

 



Jeff King <peff@xxxxxxxx> writes:

>> If you do this:
>> 
>> 	rm -fr d e
>>         mkdir e
>>         >e/f
>>         ln -s e d
>>         git add d/f
>> 
>> we do complain that d/f is beyond a symlink (meaning that all you
>> can add is the symlink d that may happen to point at something).
>
> Right, but that is because you are adding a bogus entry to the index; we
> cannot have both 'd' as a symlink and 'd/f' as a path in our git tree.
> But in the removal case, the index manipulation is perfectly reasonable.

I think you misread me.  I am not adding 'd' as a symlink at all.
IIRC, ancient versions of Git got this case wrong and added d/f to
the index, which we later fixed.

I have been hinting that we should do the same safety not to touch
(even compare the contents of) e/f, because the only reason we even
look at it is because it appears beyond a symbolic link 'd'.
--
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]