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: Tal Kelrich via GitGitGadget <gitgitgadget@gmail.com>,
	git@vger.kernel.org, Paul Mackerras <paulus@ozlabs.org>,
	Tal Kelrich <hasturkun@gmail.com>
Subject: Re: [PATCH] gitk: new option to hide prefetch refs
Date: Tue, 24 Aug 2021 11:46:44 -0700	[thread overview]
Message-ID: <xmqq4kbeptnv.fsf@gitster.g> (raw)
In-Reply-To: <0004f758-759b-f523-fa3d-dd7759d6eec7@gmail.com> (Derrick Stolee's message of "Tue, 24 Aug 2021 09:49:23 -0400")

Derrick Stolee <stolee@gmail.com> writes:

> On 8/24/2021 8:18 AM, Tal Kelrich via GitGitGadget wrote:
>> From: Tal Kelrich <hasturkun@gmail.com>
>> 
>> The maintenance 'prefetch' task creates refs that mirror remote refs,
>> and in repositories with many branches this can clutter the commit list.
>> 
>> Add a new option to ignore any prefetch refs, enabled by default.
>
> This seems like a sensible feature to add. Thank you for contributing!
>  
>>     It might have been better to allow gitk to read log.excludeDecoration
>>     (or a gitk specific configured pattern) and use that to ignore refs, but
>>     this was simpler for me to implement without knowing Tcl.
>
> I agree, but I also don't know Tcl so can't comment to how hard that
> might be. I'm not sure how gitk operates and why it does not automatically
> benefit from log.excludeDecoration. Is it computing its own decoration? Is
> it using a different Git command that isn't integrated with
> log.excludeDecoration, but should be?
>
> I also cannot review that this patch works as advertised. I just wanted to
> chime in with support for the idea.

I would usually say that defaulting this to 'on' would be a biased
choice [*1*], but in this case I tend to think it is a good idea to
hide these by default, as 'prefetch' came way after people started
using Git, and users did not ask for 'prefetch' refs.  The prefetching
may help users but the refs used to anchor the prefetched objects are
implementation detail that the users would rather not to see.

I wonder if we should also hide refs/stash for the same reason, but
that is outside the scope of this change.

In any case, please make it a patch relative to Paul's tree and send
it in his direction.

Thanks.


[Footnote]

*1* Whenever the inventor of a feature says "I expect users would
want this!", it needs to be taken with a moderate amount of salt, as
the inventor is self selected specimen who wanted it (after all, the
feature motivated the inventor enough to write the patch).

  reply	other threads:[~2021-08-24 18:46 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-08-24 12:18 [PATCH] gitk: new option to hide prefetch refs Tal Kelrich via GitGitGadget
2021-08-24 13:49 ` Derrick Stolee
2021-08-24 18:46   ` Junio C Hamano [this message]
2021-08-24 21:47     ` Derrick Stolee
2024-03-05 19:45 ` [PATCH v3] " Tal Kelrich
2025-03-16  3:45   ` Johannes Schindelin

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=xmqq4kbeptnv.fsf@gitster.g \
    --to=gitster@pobox.com \
    --cc=git@vger.kernel.org \
    --cc=gitgitgadget@gmail.com \
    --cc=hasturkun@gmail.com \
    --cc=paulus@ozlabs.org \
    --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).