git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Junio C Hamano <gitster@pobox.com>
To: "Derrick Stolee via GitGitGadget" <gitgitgadget@gmail.com>
Cc: git@vger.kernel.org, Eric Sunshine <sunshine@sunshineco.com>,
	Emily Shaffer <emilyshaffer@google.com>,
	Taylor Blau <me@ttaylorr.com>, Derrick Stolee <stolee@gmail.com>,
	Derrick Stolee <derrickstolee@github.com>,
	Derrick Stolee <dstolee@microsoft.com>
Subject: Re: [PATCH v2 1/2] maintenance: set log.excludeDecoration durin prefetch
Date: Wed, 20 Jan 2021 18:06:53 -0800	[thread overview]
Message-ID: <xmqqh7nbdow2.fsf@gitster.c.googlers.com> (raw)
In-Reply-To: <5b2ce9049a69d4c450093433e4fa15c4e5e0c412.1611060724.git.gitgitgadget@gmail.com> (Derrick Stolee via GitGitGadget's message of "Tue, 19 Jan 2021 12:52:03 +0000")

"Derrick Stolee via GitGitGadget" <gitgitgadget@gmail.com> writes:

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

  reply	other threads:[~2021-01-21  3:46 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-01-18  3:23 [PATCH 0/2] Two cleanups around 'prefetch' refs Derrick Stolee via GitGitGadget
2021-01-18  3:23 ` [PATCH 1/2] maintenance: set log.excludeDecoration durin prefetch Derrick Stolee via GitGitGadget
2021-01-18 15:57   ` Taylor Blau
2021-01-18  3:23 ` [PATCH 2/2] t7900: clean up some broken refs Derrick Stolee via GitGitGadget
2021-01-18 16:04   ` Taylor Blau
2021-01-18 18:24     ` Derrick Stolee
2021-01-19 12:52 ` [PATCH v2 0/2] Two cleanups around 'prefetch' refs Derrick Stolee via GitGitGadget
2021-01-19 12:52   ` [PATCH v2 1/2] maintenance: set log.excludeDecoration durin prefetch Derrick Stolee via GitGitGadget
2021-01-21  2:06     ` Junio C Hamano [this message]
2021-01-19 12:52   ` [PATCH v2 2/2] t7900: clean up some broken refs Derrick Stolee via GitGitGadget
2021-01-21  2:38     ` Junio C Hamano
2021-01-19 14:24   ` [PATCH v2 0/2] Two cleanups around 'prefetch' refs Taylor Blau
2021-01-21  2:45     ` 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=xmqqh7nbdow2.fsf@gitster.c.googlers.com \
    --to=gitster@pobox.com \
    --cc=derrickstolee@github.com \
    --cc=dstolee@microsoft.com \
    --cc=emilyshaffer@google.com \
    --cc=git@vger.kernel.org \
    --cc=gitgitgadget@gmail.com \
    --cc=me@ttaylorr.com \
    --cc=stolee@gmail.com \
    --cc=sunshine@sunshineco.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).