git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Junio C Hamano <gitster@pobox.com>
To: Derrick Stolee <stolee@gmail.com>
Cc: Emily Yang via GitGitGadget <gitgitgadget@gmail.com>,
	git@vger.kernel.org,  me@ttaylorr.com,  ps@pks.im,
	 newren@gmail.com, Emily Yang <emilyyang.git@gmail.com>
Subject: Re: [PATCH] commit-graph: add new config for changed-paths & recommend it in scalar
Date: Fri, 10 Oct 2025 09:32:23 -0700	[thread overview]
Message-ID: <xmqq4is6afag.fsf@gitster.g> (raw)
In-Reply-To: <1a88e577-a808-4815-b390-e5d2253e670c@gmail.com> (Derrick Stolee's message of "Fri, 10 Oct 2025 08:48:23 -0400")

Derrick Stolee <stolee@gmail.com> writes:

> One thing that is tricky about --[no-]changed-paths is that it is a
> "tri-state" argument due to 0087a87ba8 (commit-graph: persist
> existence of changed-paths, 2020-07-01):
>
>  * --changed-paths : Definitely write the data, even if it didn't
>    exist already.
>
>  * --no-changed-paths : Definitely _don't_ write the data, even if
>    it exists already.
>
>  * (not present) : Update filters that do exist, but don't write them
>    if they don't exist.

OK, so "--no-" is not the usual "no"; it is more like "strip
existing" that implies "even existing ones are getting nuked, there
is no way we write new ones".  OK, that may explain the construct I
found funny.  Thanks for clarifying.

> The situation that I wanted to think about was this:
>
>  * A user sets the config to 'true' in global config.
>  * They then set the config to 'false' in a specific repo.
>
> In this case, the 'false' _disables the config_ but doesn't cause
> any existing filters to be deleted.

Ouch, that hurts, as they expected this specific one would drop
existing filters but that does not happen.

Perhaps we need to strengthen the description of --no-* (if not
renaming it to --drop-* or something to clarify what it really
does).

At least the configuration needs to be explained not like: "setting
it to false is different from --no-changed-paths option".  The
documentation should not stop at saying what it is not, but should
also say what it does.  Perhaps "setting it to true is like always
giving --changed-paths, setting it to false stops writing new
changed paths filters, but without dropping existing changed paths
filters" or something along that line.

Thanks.

  reply	other threads:[~2025-10-10 16:32 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-10-09 21:01 [PATCH] commit-graph: add new config for changed-paths & recommend it in scalar Emily Yang via GitGitGadget
2025-10-09 22:30 ` Junio C Hamano
2025-10-10 12:48   ` Derrick Stolee
2025-10-10 16:32     ` Junio C Hamano [this message]
2025-10-10 12:32 ` Derrick Stolee
2025-10-17 20:58 ` [PATCH v2] " Emily Yang via GitGitGadget
2025-10-22 14:53   ` Derrick Stolee
2025-10-22 17:42     ` Junio C Hamano
2025-10-29 21:04   ` SZEDER Gábor

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=xmqq4is6afag.fsf@gitster.g \
    --to=gitster@pobox.com \
    --cc=emilyyang.git@gmail.com \
    --cc=git@vger.kernel.org \
    --cc=gitgitgadget@gmail.com \
    --cc=me@ttaylorr.com \
    --cc=newren@gmail.com \
    --cc=ps@pks.im \
    --cc=stolee@gmail.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).