Re: [PATCH 3/4] add: introduce '--resolved' option
From: Michael Montalbo <hidden>
Date: 2026-07-29 03:28:25
On Tue, Jul 28, 2026 at 2:58 PM Junio C Hamano [off-list ref] 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.
quoted hunk ↗ jump to hunk
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?