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

From: Junio C Hamano <[email-masked]>
Date: Mon, 12 May 2025 11:27:08 -0700

Elijah Newren <[email-masked]> 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).

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.

Thanks.