Re: [PATCH v5 2/3] apply: make i-t-a entries never match worktree

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

 



Hi Raymond

On 08/08/2020 16:58, Raymond E. Pasco wrote:
On Sat Aug 8, 2020 at 11:48 AM EDT, Phillip Wood wrote:
If I've understood correctly an i-t-a entry in the index combined with
nothing in the worktree is a deletion and that is why we don't want
--index to succeed when applying a creation patch? If so an expanded
explanation in the commit message to this patch would help rather than
just saying 'by definition'. I'm still a bit confused as we don't count
it as a deletion when using --cached or applying to the worktree.

Nothing that complicated - --index requires that the index and worktree
be identical, and nothing that can possibly be in a worktree is
identical to an i-t-a entry.

Oh, so --index requires the index and worktree to match and the worktree cannot represent i-t-a so they don't match. I'm still not totally convinced that it is useful to prevent a creation patch from applying when the path is missing from the worktree but is marked as i-t-a in the index but I guess it matches the behavior the general behavior where a patch can be successfully applied with 'apply' and 'apply --cached' but not with 'apply --index'

--check goes through all the same code,

The same code as --cached or --index? (I assume it's the former but
wanted to be sure)

"--cached --check" goes through the same code paths as "--cached",
"--cached --index" goes through the same code paths as "--index",
"--check" goes through the same code paths as [no options]. The option
just makes it skip the part where it writes things out.

Thanks for clarifying that

Best Wishes

Phillip






[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