git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Elijah Newren <newren@gmail.com>
To: Junio C Hamano <gitster@pobox.com>
Cc: Elijah Newren via GitGitGadget <gitgitgadget@gmail.com>,
	git@vger.kernel.org
Subject: Re: [PATCH 0/2] merge-tree: add new --mergeability-only option
Date: Mon, 12 May 2025 11:37:44 -0700	[thread overview]
Message-ID: <CABPp-BEP9Uj4o5Hd6w2N8zH3Te7tBkVWE_9ytd6y1vkKGiHZNw@mail.gmail.com> (raw)
In-Reply-To: <xmqqldr1sn0j.fsf@gitster.g>

On Mon, May 12, 2025 at 11:27 AM Junio C Hamano <gitster@pobox.com> wrote:
>
> 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.)

> 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.

  reply	other threads:[~2025-05-12 18:37 UTC|newest]

Thread overview: 29+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-05-10 22:02 [PATCH 0/2] merge-tree: add new --mergeability-only option Elijah Newren via GitGitGadget
2025-05-10 22:02 ` [PATCH 1/2] merge-ort: add a new mergeability_only option Elijah Newren via GitGitGadget
2025-05-10 22:02 ` [PATCH 2/2] merge-tree: add a new --mergeability-only flag Elijah Newren via GitGitGadget
2025-05-12 17:04 ` [PATCH 0/2] merge-tree: add new --mergeability-only option Junio C Hamano
2025-05-12 17:41   ` Elijah Newren
2025-05-12 18:27     ` Junio C Hamano
2025-05-12 18:37       ` Elijah Newren [this message]
2025-05-12 23:42 ` [PATCH v2 0/2] merge-tree: add new --dry-run option Elijah Newren via GitGitGadget
2025-05-12 23:42   ` [PATCH v2 1/2] merge-ort: add a new mergeability_only option Elijah Newren via GitGitGadget
2025-05-12 23:42   ` [PATCH v2 2/2] merge-tree: add a new --dry-run flag Elijah Newren via GitGitGadget
2025-05-13  7:15     ` Kristoffer Haugsbakk
2025-05-13 15:28       ` Elijah Newren
2025-05-13 13:24     ` Junio C Hamano
2025-05-13 15:30       ` Elijah Newren
2025-05-14 14:08         ` Junio C Hamano
2025-05-14  0:24   ` [PATCH v3 0/2] merge-tree: add new --dry-run option Elijah Newren via GitGitGadget
2025-05-14  0:24     ` [PATCH v3 1/2] merge-ort: add a new mergeability_only option Elijah Newren via GitGitGadget
2025-05-14  0:24     ` [PATCH v3 2/2] merge-tree: add a new --dry-run flag Elijah Newren via GitGitGadget
2025-05-15 13:07       ` Junio C Hamano
2025-05-16 13:18       ` Phillip Wood
2025-05-16 16:03         ` Elijah Newren
2025-05-14 15:34     ` [PATCH v3 0/2] merge-tree: add new --dry-run option Kristoffer Haugsbakk
2025-05-16 20:04     ` [PATCH v4 0/2] merge-tree: add new --quiet option Elijah Newren via GitGitGadget
2025-05-16 20:04       ` [PATCH v4 1/2] merge-ort: add a new mergeability_only option Elijah Newren via GitGitGadget
2025-05-16 20:04       ` [PATCH v4 2/2] merge-tree: add a new --quiet flag Elijah Newren via GitGitGadget
2025-05-17 19:52         ` Kristoffer Haugsbakk
2025-05-17 19:57           ` Kristoffer Haugsbakk
2025-05-19  9:05       ` [PATCH v4 0/2] merge-tree: add new --quiet option Phillip Wood
2025-05-19 15:59         ` Junio C Hamano

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=CABPp-BEP9Uj4o5Hd6w2N8zH3Te7tBkVWE_9ytd6y1vkKGiHZNw@mail.gmail.com \
    --to=newren@gmail.com \
    --cc=git@vger.kernel.org \
    --cc=gitgitgadget@gmail.com \
    --cc=gitster@pobox.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;
as well as URLs for NNTP newsgroup(s).