* [BUG] apply -N deletes the index
@ 2021-05-18 13:59 Raymond E. Pasco
0 siblings, 0 replies; only message in thread
From: Raymond E. Pasco @ 2021-05-18 13:59 UTC (permalink / raw)
To: git; +Cc: Christian Couder
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
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').
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2021-05-18 13:59 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-05-18 13:59 [BUG] apply -N deletes the index Raymond E. Pasco
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).