All of lore.kernel.org
 help / color / mirror / Atom feed
From: Johannes Schindelin <Johannes.Schindelin@gmx.de>
To: Pratyush Yadav <me@yadavpratyush.com>
Cc: git@vger.kernel.org
Subject: Re: [PATCH 0/1] git-gui: remove unused global declarations
Date: Mon, 28 Oct 2019 14:15:51 +0100 (CET)	[thread overview]
Message-ID: <nycvar.QRO.7.76.6.1910281412300.46@tvgsbejvaqbjf.bet> (raw)
In-Reply-To: <20191025013255.7367-1-me@yadavpratyush.com>

Hi Pratyush,

On Fri, 25 Oct 2019, Pratyush Yadav wrote:

> A lot of places have unused global variables declared. Remove them.
>
> It started as a couple of quick fixes and ended up in me writing an ugly
> hacky script to catch all the instances of unused global declarations.
> Lot more than I expected.
>
> The script can be found at [0].

Wouldn't it make more sense to integrate that script into a Makefile
target `check`, rather than hiding it in a gist (that might become
unavailable if GitHub goes away, as some of you seem to fear)?

> The script at [0] will only catch the unused globals in 'proc's. But
> git-gui also has 'method's and 'constructor's. Just change '^proc' to
> '^constructor' or '^method'.

Why not use `grep -E -n -e '^(proc|method)'`?

> I manually checked each instance before removing just to be sure I'm not
> doing something wrong. Still, a bit of testing would be appreciated.
> Just apply this patch and go on about your business as usual. There
> _should_ be no change in the behaviour. I tested some basic functions
> like commit, push, etc, and they work fine for me.

I would, if I used Git GUI regularly ;-)

Ciao,
Dscho

>
> [0] https://gist.github.com/prati0100/0f3ef903ad1658e76ea0b95f001b4865
>
> Pratyush Yadav (1):
>   git-gui: remove unused global declarations
>
>  git-gui.sh                | 12 ++++--------
>  lib/about.tcl             |  2 +-
>  lib/blame.tcl             |  3 +--
>  lib/branch_checkout.tcl   |  2 +-
>  lib/branch_create.tcl     |  1 -
>  lib/branch_delete.tcl     |  2 +-
>  lib/browser.tcl           |  2 +-
>  lib/checkout_op.tcl       |  4 +---
>  lib/choose_font.tcl       |  2 +-
>  lib/choose_repository.tcl |  6 +++---
>  lib/class.tcl             |  1 -
>  lib/commit.tcl            | 10 +++-------
>  lib/console.tcl           |  2 +-
>  lib/database.tcl          |  2 +-
>  lib/diff.tcl              | 21 +++++++--------------
>  lib/error.tcl             |  2 +-
>  lib/index.tcl             |  9 ++++-----
>  lib/line.tcl              |  2 +-
>  lib/merge.tcl             |  5 ++---
>  lib/mergetool.tcl         | 10 +++++-----
>  lib/remote_add.tcl        |  5 ++---
>  lib/search.tcl            |  4 ++--
>  lib/sshkey.tcl            |  2 +-
>  lib/tools_dlg.tcl         |  6 +++---
>  24 files changed, 47 insertions(+), 70 deletions(-)
>
> --
> 2.21.0
>
>

  parent reply	other threads:[~2019-10-28 13:16 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-10-25  1:32 [PATCH 0/1] git-gui: remove unused global declarations Pratyush Yadav
2019-10-25  1:32 ` [PATCH 1/1] " Pratyush Yadav
2019-10-25  3:54   ` Junio C Hamano
2019-10-29 21:32     ` Pratyush Yadav
2019-10-28 13:15 ` Johannes Schindelin [this message]
2019-10-29 19:09   ` [PATCH 0/1] " Pratyush Yadav

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=nycvar.QRO.7.76.6.1910281412300.46@tvgsbejvaqbjf.bet \
    --to=johannes.schindelin@gmx.de \
    --cc=git@vger.kernel.org \
    --cc=me@yadavpratyush.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.