From: Stefan Haller <stefan@haller-berlin.de>
To: me@yadavpratyush.com
Cc: git@vger.kernel.org
Subject: [PATCH v2 1/1] git-gui: Auto-rescan on activate
Date: Tue, 3 Nov 2020 17:16:31 +0100 [thread overview]
Message-ID: <20201103161631.89971-2-stefan@haller-berlin.de> (raw)
In-Reply-To: <20201103161631.89971-1-stefan@haller-berlin.de>
Do an automatic rescan whenever the git-gui window receives focus. Most other
GUI tools do this, and it's very convenient; no more pressing F5 manually.
People who don't like this behavior can turn it off in the Options dialog.
Signed-off-by: Stefan Haller <stefan@haller-berlin.de>
---
git-gui.sh | 5 +++++
lib/option.tcl | 1 +
2 files changed, 6 insertions(+)
diff --git a/git-gui.sh b/git-gui.sh
index 867b8ce..14735a3 100755
--- a/git-gui.sh
+++ b/git-gui.sh
@@ -906,6 +906,7 @@ set font_descs {
}
set default_config(gui.stageuntracked) ask
set default_config(gui.displayuntracked) true
+set default_config(gui.autorescan) true
######################################################################
##
@@ -4007,6 +4008,10 @@ bind . <Alt-Key-2> {focus_widget $::ui_index}
bind . <Alt-Key-3> {focus $::ui_diff}
bind . <Alt-Key-4> {focus $::ui_comm}
+if {[is_config_true gui.autorescan]} {
+ bind . <FocusIn> { if {"%W" eq "."} do_rescan }
+}
+
set file_lists_last_clicked($ui_index) {}
set file_lists_last_clicked($ui_workdir) {}
diff --git a/lib/option.tcl b/lib/option.tcl
index e43971b..9e83db7 100644
--- a/lib/option.tcl
+++ b/lib/option.tcl
@@ -145,6 +145,7 @@ proc do_options {} {
{b merge.diffstat {mc "Show Diffstat After Merge"}}
{t merge.tool {mc "Use Merge Tool"}}
+ {b gui.autorescan {mc "Auto-Rescan On Activate"}}
{b gui.trustmtime {mc "Trust File Modification Timestamps"}}
{b gui.pruneduringfetch {mc "Prune Tracking Branches During Fetch"}}
{b gui.matchtrackingbranch {mc "Match Tracking Branches"}}
--
2.29.2
next prev parent reply other threads:[~2020-11-03 16:16 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-11-01 17:05 [PATCH 0/2] git-gui: Auto-rescan on activate Stefan Haller
2020-11-01 17:05 ` [PATCH 1/2] git-gui: Delay rescan until idle time Stefan Haller
2020-11-02 15:45 ` Pratyush Yadav
2020-11-02 19:29 ` Stefan Haller
2020-11-01 17:05 ` [PATCH 2/2] git-gui: Auto-rescan on activate Stefan Haller
2020-11-02 15:48 ` Pratyush Yadav
2020-11-02 19:31 ` Stefan Haller
2020-11-02 13:15 ` [PATCH 0/2] " Pratyush Yadav
2020-11-02 19:24 ` Stefan Haller
2020-11-03 16:16 ` [PATCH v2 0/1] " Stefan Haller
2020-11-03 16:16 ` Stefan Haller [this message]
2020-11-14 19:14 ` [PATCH v2 1/1] " Stefan Haller
2020-11-17 7:36 ` Pratyush Yadav
2020-11-17 11:13 ` Stefan Haller
2020-11-17 12:05 ` Pratyush Yadav
2020-11-18 9:17 ` Stefan Haller
2020-12-17 19:45 ` [PATCH 0/2] " Johannes Sixt
2020-12-17 20:10 ` Pratyush Yadav
2020-12-17 22:21 ` Johannes Sixt
2020-12-18 10:36 ` Stefan Haller
2020-12-18 18:07 ` Johannes Sixt
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
List information: http://vger.kernel.org/majordomo-info.html
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20201103161631.89971-2-stefan@haller-berlin.de \
--to=stefan@haller-berlin.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.
Code repositories for project(s) associated with this public inbox
https://80x24.org/mirrors/git.git
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 read-only IMAP folder(s) and NNTP newsgroup(s).