From: "Raymond E. Pasco" <ray@ameretat.dev>
To: <git@vger.kernel.org>
Cc: "Christian Couder" <christian.couder@gmail.com>
Subject: [BUG] apply -N deletes the index
Date: Tue, 18 May 2021 09:59:20 -0400 [thread overview]
Message-ID: <CBGFBF8EDCPS.LNG4VOVFVR6M@ziyou.local> (raw)
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').
reply other threads:[~2021-05-18 13:59 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: http://vger.kernel.org/majordomo-info.html
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=CBGFBF8EDCPS.LNG4VOVFVR6M@ziyou.local \
--to=ray@ameretat.dev \
--cc=christian.couder@gmail.com \
--cc=git@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://80x24.org/mirrors/git.git
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 read-only IMAP folder(s) and NNTP newsgroup(s).