The --intent-to-add (-N) flag to apply has not worked properly since its introduction in Git 2.19; in particular, it creates an empty index except for any new files in the patch, making it largely useless except on blank repositories. This patch series fixes it to work as expected and updates the tests and documentation for this flag. Earlier discussion of this issue can be found in the threads associated with message ids <20211106114202.3486969-1-aclopte@xxxxxxxxx> and <20250511003955.242889-1-ray@xxxxxxxxxxxx>. Raymond E. Pasco (5): apply: error on --intent-to-add outside gitdir apply: read in the index in --intent-to-add mode apply: only write intents to add for new files t4140: test apply --intent-to-add interactions apply docs: clarify wording for --intent-to-add Documentation/git-apply.adoc | 8 ++++---- apply.c | 12 ++++++++---- t/t4140-apply-ita.sh | 31 ++++++++++++++++++++++++++++++- 3 files changed, 42 insertions(+), 9 deletions(-) -- 2.50.0.195.g74e6fc65d0