Re: [PATCH 3/4] add: introduce '--resolved' option

Michael Montalbo <[email protected]> Tue, 28 Jul 2026 20:28:11 -0700
Newsgroups org.kernel.vger.git
Message-ID <CAC2Qwm+AmeDubDrkLmu8Rz9rtO3697gokwF2=2c5PgP--hZT2w@mail.gmail.com>
On Tue, Jul 28, 2026 at 2:58 PM Junio C Hamano <[email protected]> wrote:
>
> -       if (addremove && take_worktree_changes)
> -               die(_("options '%s' and '%s' cannot be used together"), "-A", "-u");
> +       die_for_incompatible_opt3(take_worktree_changes, "-u/--update",
> +                                 0 <= addremove_explicit, "-A/--all",
> +                                 add_resolved, "--resolved");
>

Should this be "0 < addremove_explicit"? I thought addremove_explicit being
set to 0 indicates either --no-all or --ignore-removal (via ignore_removal_cb)
was specified by the user. I think this causes "git add --resolved --no-all" to
die naming "-A/--all"  as the culprit even though the opposite flag was set.
Also, it may cause "git add -u --ignore-removal" and "git add -u --no-all" to
now die, whereas they were accepted before.

>
> diff --git a/t/t2207-add-resolved.sh b/t/t2207-add-resolved.sh
> new file mode 100755
> index 0000000000..f88e3f413e
> --- /dev/null
> +++ b/t/t2207-add-resolved.sh

Does this new test file need a t/meson.build entry?