git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* RE: [PATCH v3] apply: --intent-to-add should imply --index
@ 2025-05-01  9:03 Jason Cho
  2025-05-01 12:48 ` Kristoffer Haugsbakk
  0 siblings, 1 reply; 17+ messages in thread
From: Jason Cho @ 2025-05-01  9:03 UTC (permalink / raw)
  To: git@vger.kernel.org
  Cc: aclopte@gmail.com, gitster@pobox.com, rhodges@cisco.com,
	rphodges@gmail.com

I'm following up on the bug reported by Ryan Hodges on October 26, 2021,
regarding the `git apply --intent-to-add` command incorrectly marking all 
other tracked files as deleted from the index.

Johannes Altmanninger submitted patch v3 titled "apply: --intent-to-add 
should imply --index" to fix this issue. 

Is this fix merged? If so, which Git version includes this fix.



^ permalink raw reply	[flat|nested] 17+ messages in thread
* [PATCH 0/5] fix apply --intent-to-add
@ 2025-06-28 22:52 Raymond E. Pasco
  2025-06-28 22:52 ` [PATCH 1/5] apply: error on --intent-to-add outside gitdir Raymond E. Pasco
  0 siblings, 1 reply; 17+ messages in thread
From: Raymond E. Pasco @ 2025-06-28 22:52 UTC (permalink / raw)
  To: git
  Cc: Raymond E. Pasco, aclopte, gitster, jason11choca,
	kristofferhaugsbakk, rhodges

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@gmail.com> and
<20250511003955.242889-1-ray@ameretat.dev>.

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


^ permalink raw reply	[flat|nested] 17+ messages in thread

end of thread, other threads:[~2025-07-01  5:26 UTC | newest]

Thread overview: 17+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-05-01  9:03 [PATCH v3] apply: --intent-to-add should imply --index Jason Cho
2025-05-01 12:48 ` Kristoffer Haugsbakk
2025-05-01 16:31   ` Junio C Hamano
2025-05-02  4:11     ` Ryan Hodges
2025-05-03  3:51       ` Raymond E. Pasco
2025-05-03  8:22         ` Raymond E. Pasco
2025-05-11  0:36         ` [PATCH 0/5] apply: fix apply --intent-to-add Raymond E. Pasco
2025-05-11  0:36           ` [PATCH 1/5] apply: error on --intent-to-add outside gitdir Raymond E. Pasco
2025-05-11  0:36           ` [PATCH 2/5] apply: read in the index in --intent-to-add mode Raymond E. Pasco
2025-05-12  2:13             ` Raymond E. Pasco
2025-05-13 17:52               ` Jason Cho
2025-05-11  0:36           ` [PATCH 3/5] apply: only write intents to add for new files Raymond E. Pasco
2025-05-11  0:36           ` [PATCH 4/5] t4140: test apply --intent-to-add interactions Raymond E. Pasco
2025-05-11  0:36           ` [PATCH 5/5] apply docs: clarify wording for --intent-to-add Raymond E. Pasco
  -- strict thread matches above, loose matches on Subject: below --
2025-06-28 22:52 [PATCH 0/5] fix apply --intent-to-add Raymond E. Pasco
2025-06-28 22:52 ` [PATCH 1/5] apply: error on --intent-to-add outside gitdir Raymond E. Pasco
2025-06-30 18:34   ` Junio C Hamano
2025-07-01  5:26     ` 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).