git/list[1] front-page[2] threads[3] people[4] search[5] about
 

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

From
Michael Montalbo <mmontalbo@gmail.com>
Date
Jul 29, 2026, 03:28 UTC
Message-ID
<CAC2Qwm+AmeDubDrkLmu8Rz9rtO3697gokwF2=2c5PgP--hZT2w@mail.gmail.com>
In-Reply-To
<20260728215219.753678-4-gitster@pobox.com>
On Tue, Jul 28, 2026 at 2:58 PM Junio C Hamano <gitster@pobox.com> wrote:
Show 7 quoted lines
>
> -       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.

Show 6 quoted lines
>
> 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?
Previous: Junio C HamanoNext: Junio C Hamano
Message 5 of 30 in “git add --resolved”
  1. 0/4 git add --resolvedJunio C Hamano, Jul 28, 2026
  2. 1/4 merge-ll: consolidate conflict marker scanning logicJunio C Hamano, Jul 28, 2026
  3. 2/4 read-cache: add remove_file_from_index_with_flags()Junio C Hamano, Jul 28, 2026
  4. 3/4 add: introduce '--resolved' optionJunio C Hamano, Jul 28, 2026
  5. Michael MontalboJul 29, 2026
  6. Junio C HamanoJul 29, 2026
  7. Junio C HamanoJul 29, 2026
  8. Junio C HamanoAug 2, 2026
  9. Junio C HamanoJul 29, 2026
  10. Michael MontalboAug 2, 2026
  11. Junio C HamanoAug 2, 2026
  12. Michael MontalboAug 3, 2026
  13. 4/4 read-cache: reindentJunio C Hamano, Jul 28, 2026
  14. 0/4 git add --resolvedJunio C Hamano, Jul 29, 2026
  15. 1/4 read-cache: reindentJunio C Hamano, Jul 29, 2026
  16. 2/4 merge-ll: consolidate conflict marker scanning logicJunio C Hamano, Jul 29, 2026
  17. 3/4 read-cache: add remove_file_from_index_with_flags()Junio C Hamano, Jul 29, 2026
  18. 4/4 add: introduce '--resolved' optionJunio C Hamano, Jul 29, 2026
  19. Junio C HamanoJul 29, 2026
  20. Michael MontalboJul 29, 2026
  21. Junio C HamanoJul 30, 2026
  22. Michael MontalboAug 2, 2026
  23. 0/4 git add --resolvedJunio C Hamano, Jul 31, 2026
  24. 1/4 read-cache: reindentJunio C Hamano, Jul 31, 2026
  25. 2/4 merge-ll: consolidate conflict marker scanning logicJunio C Hamano, Jul 31, 2026
  26. 3/4 read-cache: add remove_file_from_index_with_flags()Junio C Hamano, Jul 31, 2026
  27. 4/4 add: introduce '--resolved' optionJunio C Hamano, Jul 31, 2026
  28. Jeff KingAug 1, 2026
  29. Junio C HamanoAug 1, 2026
  30. Junio C HamanoAug 1, 2026

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.