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

Re: [PATCH] commit-graph: add new config for changed-paths & recommend it in scalar

From
Junio C Hamano <gitster@pobox.com>
Date
Oct 10, 2025, 16:32 UTC
Message-ID
<xmqq4is6afag.fsf@gitster.g>
In-Reply-To
<1a88e577-a808-4815-b390-e5d2253e670c@gmail.com>
Derrick Stolee <stolee@gmail.com> writes:
Show 12 quoted lines
> 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.

Show 7 quoted lines
> 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.
Previous: Derrick StoleeNext: Derrick Stolee
Message 4 of 9 in “commit-graph: add new config for changed-paths & recommend it in scalar”
  1. commit-graph: add new config for changed-paths & recommend it in scalarEmily Yang via GitGitGadget, Oct 9, 2025
  2. Junio C HamanoOct 9, 2025
  3. Derrick StoleeOct 10, 2025
  4. Junio C HamanoOct 10, 2025
  5. Derrick StoleeOct 10, 2025
  6. commit-graph: add new config for changed-paths & recommend it in scalarEmily Yang via GitGitGadget, Oct 17, 2025
  7. Derrick StoleeOct 22, 2025
  8. Junio C HamanoOct 22, 2025
  9. SZEDER GáborOct 29, 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.