Re: [PATCH] gitk: new option to hide prefetch refs

2 messages, 2 authors, 2021-08-24 · open the first message on its own page

Re: [PATCH] gitk: new option to hide prefetch refs

From: Junio C Hamano <hidden>
Date: 2021-08-24 18:46:50

Derrick Stolee [off-list ref] writes:
On 8/24/2021 8:18 AM, Tal Kelrich via GitGitGadget wrote:
quoted
From: Tal Kelrich <redacted>

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!
 
quoted
    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).

Re: [PATCH] gitk: new option to hide prefetch refs

From: Derrick Stolee <hidden>
Date: 2021-08-24 21:47:19

On 8/24/2021 2:46 PM, Junio C Hamano wrote:
Derrick Stolee [off-list ref] writes:
quoted
On 8/24/2021 8:18 AM, Tal Kelrich via GitGitGadget wrote:
quoted
From: Tal Kelrich <redacted>

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!
...> 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.
...
*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).
I agree with both points. As the inventor of prefetch refs, my opinion
should also be taken with similar salt.

I do want to add at least that Git itself hides these refs by modifying
log.excludeDecoration during 'git maintenance start', so there is
precedent. Git is hiding them, but user can become confused when they
appear in gitk.

Thanks,
-Stolee
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help