Re: [PATCH v2] git-apply.txt: update descriptions of --cached, --index

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

 



On Thu Aug 20, 2020 at 7:57 PM EDT, Junio C Hamano wrote:
> I do not see why we want to stress the last part after ", even if".
> The safety mechanism insists on the working tree file and the index
> entry to be identical, and the location where in the file the
> difference is, is irrelevant, whether it is outside the area the
> incoming patch touches, or it overlaps.

It's because this is the confusing part of the option - it's easy to
grasp "apply the patch to both the working copy and the index", but
that's not exactly what the option does, it applies only in the case of
identical preimages (and therefore, identical postimages). If you do
want to apply it to both the working copy and the index, which aren't
identical (e.g., you're a heavy worktree mangler and "add -p" user, like
me), this points you towards invoking it twice, once with no option and
once with "--cached".




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

  Powered by Linux