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

Re: [PATCH v2 1/2] maintenance: set log.excludeDecoration durin prefetch

From
Junio C Hamano <gitster@pobox.com>
Date
Jan 21, 2021, 02:06 UTC
Message-ID
<xmqqh7nbdow2.fsf@gitster.c.googlers.com>
In-Reply-To
<5b2ce9049a69d4c450093433e4fa15c4e5e0c412.1611060724.git.gitgitgadget@gmail.com>
"Derrick Stolee via GitGitGadget" <gitgitgadget@gmail.com> writes:
Show 23 quoted lines
> From: Derrick Stolee <dstolee@microsoft.com>
>
> The 'prefetch' task fetches refs from all remotes and places them in the
> refs/prefetch/<remote>/ refspace. As this task is intended to run in the
> background, this allows users to keep their local data very close to the
> remote servers' data while not updating the users' understanding of the
> remote refs in refs/remotes/<remote>/.
>
> However, this can clutter 'git log' decorations with copies of the refs
> with the full name 'refs/prefetch/<remote>/<branch>'.
>
> The log.excludeDecoration config option was added in a6be5e67 (log: add
> log.excludeDecoration config option, 2020-05-16) for exactly this
> purpose.
>
> Ensure we set this only for users that would benefit from it by
> assigning it at the beginning of the prefetch task. Other alternatives
> would be during 'git maintenance register' or 'git maintenance start',
> but those might assign the config even when the prefetch task is
> disabled by existing config. Further, users could run 'git maintenance
> run --task=prefetch' using their own scripting or scheduling. This
> provides the best coverage to automatically update the config when
> valuable.

OK. I think those users who keep distance from "git maintenance" are different story but all others cannot be using refs/prefetch/ hierarchy for purposes other than "git maintenance" dictates, so "git maintenance [register|start]", or even when the user first runs "git maintenance" for that matter, would be acceptable point to add the configuration, but at the beginning of a prefetch task, we know the hierarchy is being used for what "git maintenance" wants to do, so it is a good place to do so.

But playing devil's advocate, I do not think throwing refs/prefetch into a "hardcoded list of hierarchies that would never be used for decoration purposes" would upset any end-users in practice. The only reason why I do not make such a suggestion is it is more work (such a hardcoded reject list does not exist, if I recall correctly).

> It is improbable, but possible, that users might want to run the
> prefetch task _and_ see these refs in their log decorations. This seems
> incredibly unlikely to me, but users can always opt-in on a
> command-by-command basis using --decorate-refs=refs/prefetch/.

It is not a viable workaround to add "--decorate-refs=refs/prefetch" that is a mouthful; configuration options are to reduce such typing, not to force more of them. But because I agree with that "incredibly unlikely" assessment, I do not care.

Thanks.
Previous: Derrick Stolee via GitGitGadgetNext: Derrick Stolee via GitGitGadget
Message 9 of 13 in “Two cleanups around 'prefetch' refs”
  1. 0/2 Two cleanups around 'prefetch' refsDerrick Stolee via GitGitGadget, Jan 18, 2021
  2. 1/2 maintenance: set log.excludeDecoration durin prefetchDerrick Stolee via GitGitGadget, Jan 18, 2021
  3. Taylor BlauJan 18, 2021
  4. 2/2 t7900: clean up some broken refsDerrick Stolee via GitGitGadget, Jan 18, 2021
  5. Taylor BlauJan 18, 2021
  6. Derrick StoleeJan 18, 2021
  7. 0/2 Two cleanups around 'prefetch' refsDerrick Stolee via GitGitGadget, Jan 19, 2021
  8. 1/2 maintenance: set log.excludeDecoration durin prefetchDerrick Stolee via GitGitGadget, Jan 19, 2021
  9. Junio C HamanoJan 21, 2021
  10. 2/2 t7900: clean up some broken refsDerrick Stolee via GitGitGadget, Jan 19, 2021
  11. Junio C HamanoJan 21, 2021
  12. Taylor BlauJan 19, 2021
  13. Junio C HamanoJan 21, 2021

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.