From: "Raymond E. Pasco" <ray@ameretat•dev>
To: git@vger•kernel.org
Cc: Junio C Hamano <gitster@pobox•com>,
Kristoffer Haugsbakk <kristofferhaugsbakk@fastmail•com>,
Jason Cho <jason11choca@proton•me>,
"aclopte@gmail•com" <aclopte@gmail•com>,
Ryan Hodges <rhodges@cisco•com>,
"Raymond E. Pasco" <ray@ameretat•dev>
Subject: [PATCH 0/5] apply: fix apply --intent-to-add
Date: Sat, 10 May 2025 20:36:43 -0400 [thread overview]
Message-ID: <20250511003955.242889-1-ray@ameretat.dev> (raw)
In-Reply-To: <4e2szrowd43w6lrzawqtddamdxvp6ke65jkzmdoru4gjin7xhn@kaqe7skrktgt>
This patch series fixes the -N/--intent-to-add flag for git apply, which
has not worked properly since its introduction in Git 2.19.
In particular, the index is properly initialized, and not touched except
to add the requested intents to add.
Loosely based on the patch from Johannes Altmanninger, message-id
<20211106114202.3486969-1-aclopte@gmail•com>, but that patch turned out to
be incorrect.
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.49.0.1106.gc0efa3ba58
next prev parent reply other threads:[~2025-05-11 0:40 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
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 ` Raymond E. Pasco [this message]
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
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
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20250511003955.242889-1-ray@ameretat.dev \
--to=ray@ameretat$(echo .)dev \
--cc=aclopte@gmail$(echo .)com \
--cc=git@vger$(echo .)kernel.org \
--cc=gitster@pobox$(echo .)com \
--cc=jason11choca@proton$(echo .)me \
--cc=kristofferhaugsbakk@fastmail$(echo .)com \
--cc=rhodges@cisco$(echo .)com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox