From: Junio C Hamano <gitster@pobox.com>
To: Michael Montalbo <mmontalbo@gmail.com>
Cc: git@vger.kernel.org
Subject: Re: [PATCH v2 0/4] git add --resolved
Date: Thu, 30 Jul 2026 01:41:46 -0700 [thread overview]
Message-ID: <xmqqfr10lvhx.fsf@gitster.g> (raw)
In-Reply-To: <CAC2QwmKD1d=-mz4WrkA7CHwi-ko75MP2LDFPWx+1FGLQtf4QtA@mail.gmail.com> (Michael Montalbo's message of "Wed, 29 Jul 2026 16:41:15 -0700")
Michael Montalbo <mmontalbo@gmail.com> writes:
> For example, could the user-facing option be something like:
>
> git add --unmerged
>
> with the same default behavior being proposed: select only unmerged
> index entries, and refuse the operation if any selected regular file
> contains standard Git conflict markers.
>
> That would also potentially leave room for explicit policy escape
> hatches later, such as:
>
> git add --unmerged --allow-conflict-markers
>
> for cases where marker-looking content is intentional; or
Sure, but I do not think of a reason why the posted patches cannot
later be extended in that direction if somebody wanted to (but
because the option is called "--resolved", the command line would
need to become "add --resolved --allow-conflict-markers"). I just
did not feel the need for it myself, and because --allow would be a
rare case, I would likely do "git add --resolved", see it fail due
to conflict marker looking strings that are deliberately left in,
and then do "git add $path" to cover these small exceptions, i.e., I
do not think anybody would need "--allow-conflict-markers" option.
> something like:
>
> git add --unmerged --skip-conflict-markers
>
> for a mode that stages marker-free unmerged paths while leaving
> marker-containing paths unmerged and returning non-zero.
Have no idea how the user recovers after performing an operation
like that.
The naming is very much deliberate. "git am --resolved" tells the
command "I am done with them, so please continue". It is not like I
want to add anything that are unmerged. I dealt with unmerged stuff
and turned them into the resolved state, and the command is a request
to record that fact. It is a regression to call it "--unmerged".
prev parent reply other threads:[~2026-07-30 8:41 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-07-28 21:52 [PATCH 0/4] git add --resolved Junio C Hamano
2026-07-28 21:52 ` [PATCH 1/4] merge-ll: consolidate conflict marker scanning logic Junio C Hamano
2026-07-28 21:52 ` [PATCH 2/4] read-cache: add remove_file_from_index_with_flags() Junio C Hamano
2026-07-28 21:52 ` [PATCH 3/4] add: introduce '--resolved' option Junio C Hamano
2026-07-29 3:28 ` Michael Montalbo
2026-07-29 13:43 ` Junio C Hamano
2026-07-29 13:49 ` Junio C Hamano
2026-07-29 15:01 ` Junio C Hamano
2026-07-28 21:52 ` [PATCH 4/4] read-cache: reindent Junio C Hamano
2026-07-29 17:25 ` [PATCH v2 0/4] git add --resolved Junio C Hamano
2026-07-29 17:25 ` [PATCH v2 1/4] read-cache: reindent Junio C Hamano
2026-07-29 17:25 ` [PATCH v2 2/4] merge-ll: consolidate conflict marker scanning logic Junio C Hamano
2026-07-29 17:25 ` [PATCH v2 3/4] read-cache: add remove_file_from_index_with_flags() Junio C Hamano
2026-07-29 17:25 ` [PATCH v2 4/4] add: introduce '--resolved' option Junio C Hamano
2026-07-29 22:19 ` Junio C Hamano
2026-07-29 23:41 ` [PATCH v2 0/4] git add --resolved Michael Montalbo
2026-07-30 8:41 ` Junio C Hamano [this message]
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=xmqqfr10lvhx.fsf@gitster.g \
--to=gitster@pobox.com \
--cc=git@vger.kernel.org \
--cc=mmontalbo@gmail.com \
/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.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox