git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Johannes Schindelin <Johannes.Schindelin@gmx.de>
To: Tal Kelrich <hasturkun@gmail.com>
Cc: gitgitgadget@gmail.com, git@vger.kernel.org,
	Johannes Sixt <j6t@kdbg.org>
Subject: Re: [PATCH v3] gitk: new option to hide prefetch refs
Date: Sun, 16 Mar 2025 04:45:54 +0100 (CET)	[thread overview]
Message-ID: <993848e3-1138-0e69-c36c-acaa5ddce3a4@gmx.de> (raw)
In-Reply-To: <20240305194559.2373-1-hasturkun@gmail.com>

Hi Tal,

I'm Cc:ing the new gitk maintainer, for visibility.

Ciao,
Johannes

On Tue, 5 Mar 2024, Tal Kelrich wrote:

> 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.
>
> Signed-off-by: Tal Kelrich <hasturkun@gmail.com>
> ---
> Changes since v1:
>  - Patch rebuilt on gitk tree.
>  gitk | 23 ++++++++++++++++-------
>  1 file changed, 16 insertions(+), 7 deletions(-)
>
> diff --git a/gitk b/gitk
> index 0ae7d68..85315df 100755
> --- a/gitk
> +++ b/gitk
> @@ -1780,6 +1780,7 @@ proc readrefs {} {
>      global selecthead selectheadid
>      global hideremotes
>      global tclencoding
> +    global hideprefetch
>
>      foreach v {tagids idtags headids idheads otherrefids idotherrefs} {
>          unset -nocomplain $v
> @@ -1814,6 +1815,7 @@ proc readrefs {} {
>              }
>              set tagids($name) $id
>              lappend idtags($id) $name
> +        } elseif {[string match "prefetch/*" $name] && $hideprefetch} {
>          } else {
>              set otherrefids($name) $id
>              lappend idotherrefs($id) $name
> @@ -11551,7 +11553,7 @@ proc create_prefs_page {w} {
>  proc prefspage_general {notebook} {
>      global NS maxwidth maxgraphpct showneartags showlocalchanges
>      global tabstop limitdiffs autoselect autosellen extdifftool perfile_attrs
> -    global hideremotes want_ttk have_ttk maxrefs web_browser
> +    global hideremotes want_ttk have_ttk maxrefs web_browser hideprefetch
>
>      set page [create_prefs_page $notebook.general]
>
> @@ -11575,6 +11577,9 @@ proc prefspage_general {notebook} {
>      ${NS}::checkbutton $page.hideremotes -text [mc "Hide remote refs"] \
>          -variable hideremotes
>      grid x $page.hideremotes -sticky w
> +    ${NS}::checkbutton $page.hideprefetch -text [mc "Hide prefetch refs"] \
> +        -variable hideprefetch
> +    grid x $page.hideprefetch -sticky w
>
>      ${NS}::label $page.ddisp -text [mc "Diff display options"]
>      grid $page.ddisp - -sticky w -pady 10
> @@ -11699,7 +11704,7 @@ proc doprefs {} {
>      global oldprefs prefstop showneartags showlocalchanges
>      global uicolor bgcolor fgcolor ctext diffcolors selectbgcolor markbgcolor
>      global tabstop limitdiffs autoselect autosellen extdifftool perfile_attrs
> -    global hideremotes want_ttk have_ttk
> +    global hideremotes want_ttk have_ttk hideprefetch
>
>      set top .gitkprefs
>      set prefstop $top
> @@ -11708,7 +11713,8 @@ proc doprefs {} {
>          return
>      }
>      foreach v {maxwidth maxgraphpct showneartags showlocalchanges \
> -                   limitdiffs tabstop perfile_attrs hideremotes want_ttk} {
> +                   limitdiffs tabstop perfile_attrs hideremotes want_ttk \
> +                   hideprefetch} {
>          set oldprefs($v) [set $v]
>      }
>      ttk_toplevel $top
> @@ -11834,7 +11840,8 @@ proc prefscan {} {
>      global oldprefs prefstop
>
>      foreach v {maxwidth maxgraphpct showneartags showlocalchanges \
> -                   limitdiffs tabstop perfile_attrs hideremotes want_ttk} {
> +                   limitdiffs tabstop perfile_attrs hideremotes want_ttk \
> +                   hideprefetch} {
>          global $v
>          set $v $oldprefs($v)
>      }
> @@ -11848,7 +11855,7 @@ proc prefsok {} {
>      global oldprefs prefstop showneartags showlocalchanges
>      global fontpref mainfont textfont uifont
>      global limitdiffs treediffs perfile_attrs
> -    global hideremotes
> +    global hideremotes hideprefetch
>
>      catch {destroy $prefstop}
>      unset prefstop
> @@ -11894,7 +11901,8 @@ proc prefsok {} {
>            $limitdiffs != $oldprefs(limitdiffs)} {
>          reselectline
>      }
> -    if {$hideremotes != $oldprefs(hideremotes)} {
> +    if {$hideremotes != $oldprefs(hideremotes) ||
> +          $hideprefetch != $oldprefs(hideprefetch)} {
>          rereadrefs
>      }
>  }
> @@ -12368,6 +12376,7 @@ set cmitmode "patch"
>  set wrapcomment "none"
>  set showneartags 1
>  set hideremotes 0
> +set hideprefetch 1
>  set maxrefs 20
>  set visiblerefs {"master"}
>  set maxlinelen 200
> @@ -12480,7 +12489,7 @@ set config_variables {
>      filesepbgcolor filesepfgcolor linehoverbgcolor linehoverfgcolor
>      linehoveroutlinecolor mainheadcirclecolor workingfilescirclecolor
>      indexcirclecolor circlecolors linkfgcolor circleoutlinecolor diffbgcolors
> -    web_browser
> +    web_browser hideprefetch
>  }
>  foreach var $config_variables {
>      config_init_trace $var
> --
> 2.37.1.windows.1
>
>
>

      reply	other threads:[~2025-03-16  3:45 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
2021-08-24 21:47     ` Derrick Stolee
2024-03-05 19:45 ` [PATCH v3] " Tal Kelrich
2025-03-16  3:45   ` Johannes Schindelin [this message]

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=993848e3-1138-0e69-c36c-acaa5ddce3a4@gmx.de \
    --to=johannes.schindelin@gmx.de \
    --cc=git@vger.kernel.org \
    --cc=gitgitgadget@gmail.com \
    --cc=hasturkun@gmail.com \
    --cc=j6t@kdbg.org \
    /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).