[BUG] apply -N deletes the index

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

 



Expected behavior: git apply -N foo.patch applies a patch to the
worktree, additionally adding 'new file' entries in the patch to the
index as intent-to-add entries.

Actual behavior: git apply -N foo.patch overwrites the entire index, so
that after the command it *only* contains the intent-to-add entries
added by the patch, and nothing else. (It still applies properly to the
worktree.)

I am looking at apply.c to figure out why this happens, but thought a
report to the list was warranted; any thoughts from someone more
familiar with this machinery would be helpful.

I went back in the history and this seems to have happened since the
feature was first added (ac997db0, Merge branch 'nd/diff-apply-ita').




[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