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

Re: [PATCH 0/2] merge-tree: add new --mergeability-only option

From
Elijah Newren <newren@gmail.com>
Date
May 12, 2025, 18:37 UTC
Message-ID
<CABPp-BEP9Uj4o5Hd6w2N8zH3Te7tBkVWE_9ytd6y1vkKGiHZNw@mail.gmail.com>
In-Reply-To
<xmqqldr1sn0j.fsf@gitster.g>
On Mon, May 12, 2025 at 11:27 AM Junio C Hamano <gitster@pobox.com> wrote:
Show 14 quoted lines
>
> Elijah Newren <newren@gmail.com> writes:
>
> > I thought about that, but I was worried that folks would expect
> > "--dry-run" to not make any changes.  This mode does not prevent
> > writing objects to the object store, it merely avoids it in the "outer
> > layer" of the merge.
>
> I think we have already precedence to call something that creates
> new objects in the object database, as long as the resulting objects
> are not made reachable ("git fetch --dry-run" probably falls into
> that category).  The idea is that it does not make a change that is
> "observable" by end-users (and what "gc" sees is not part of what
> the users would be observaing).

Oh, I was unaware of `git fetch --dry-run` for some reason. And its documentation even states "without making any changes" despite the fact that it downloads more objects to the object store, so it indeed sounds like a good precedent.

I'll switch the flag name to --dry-run. (I have a suspicion, however, that the primary users of this new merge-tree flag will care about whether objects are created, so I still want the documentation to call it out, unlike git fetch's --dry-run option.)

Show 9 quoted lines
> We have "--check" (in "git apply"), which is an exact counterpart in
> the patch based workflow to this thing.  It reads
>
>         Instead of applying the patch, see if the patch is
>         applicable to the current working tree and/or the index
>         file and detects errors.  Turns off "apply".
>
> I feel that `apply --check` should have been `apply --dry-run`, so I
> would not recommend calling it `--check` for `merge-tree`, though.
Makes sense; thanks for the pointers.
Previous: Junio C HamanoNext: Elijah Newren via GitGitGadget
Message 7 of 29 in “merge-tree: add new --mergeability-only option”
  1. 0/2 merge-tree: add new --mergeability-only optionElijah Newren via GitGitGadget, May 10, 2025
  2. 1/2 merge-ort: add a new mergeability_only optionElijah Newren via GitGitGadget, May 10, 2025
  3. 2/2 merge-tree: add a new --mergeability-only flagElijah Newren via GitGitGadget, May 10, 2025
  4. Junio C HamanoMay 12, 2025
  5. Elijah NewrenMay 12, 2025
  6. Junio C HamanoMay 12, 2025
  7. Elijah NewrenMay 12, 2025
  8. 0/2 merge-tree: add new --dry-run optionElijah Newren via GitGitGadget, May 12, 2025
  9. 1/2 merge-ort: add a new mergeability_only optionElijah Newren via GitGitGadget, May 12, 2025
  10. 2/2 merge-tree: add a new --dry-run flagElijah Newren via GitGitGadget, May 12, 2025
  11. Kristoffer HaugsbakkMay 13, 2025
  12. Elijah NewrenMay 13, 2025
  13. Junio C HamanoMay 13, 2025
  14. Elijah NewrenMay 13, 2025
  15. Junio C HamanoMay 14, 2025
  16. 0/2 merge-tree: add new --dry-run optionElijah Newren via GitGitGadget, May 14, 2025
  17. 1/2 merge-ort: add a new mergeability_only optionElijah Newren via GitGitGadget, May 14, 2025
  18. 2/2 merge-tree: add a new --dry-run flagElijah Newren via GitGitGadget, May 14, 2025
  19. Junio C HamanoMay 15, 2025
  20. Phillip WoodMay 16, 2025
  21. Elijah NewrenMay 16, 2025
  22. Kristoffer HaugsbakkMay 14, 2025
  23. 0/2 merge-tree: add new --quiet optionElijah Newren via GitGitGadget, May 16, 2025
  24. 1/2 merge-ort: add a new mergeability_only optionElijah Newren via GitGitGadget, May 16, 2025
  25. 2/2 merge-tree: add a new --quiet flagElijah Newren via GitGitGadget, May 16, 2025
  26. Kristoffer HaugsbakkMay 17, 2025
  27. Kristoffer HaugsbakkMay 17, 2025
  28. Phillip WoodMay 19, 2025
  29. Junio C HamanoMay 19, 2025

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.