list mirror (unofficial, one of many)
 help / color / mirror / code / Atom feed
From: Junio C Hamano <>
To: "brian m. carlson" <>
Cc: Pratyush Yadav <>, git <>,
	Christian Couder <>,
	Johannes Schindelin <>
Subject: Re: [PATCH] git-gui: Perform rescan on window focus-in
Date: Sun, 28 Jul 2019 22:09:23 -0700	[thread overview]
Message-ID: <> (raw)
In-Reply-To: <> (brian m. carlson's message of "Sun, 28 Jul 2019 22:49:44 +0000")

"brian m. carlson" <> writes:

> These are probably pretty cheap on all but the largest repositories. I
> was worried we were enumerating all refs or all history or something
> like that.
>> ui_do_rescan changes the focus to the first diff. It is executed when you
>> press F5 or choose Rescan from the menu. do_rescan does not do that.
>> Resetting to first diff on focus change will get annoying when you are in
>> the middle of looking at some other file. do_rescan just updates the
>> software state without changing what file you are looking at or where in
>> that file you are looking at.
> Yeah, this definitely seems like the right move.

"Right move" in the sense that it would try not to change what is
being shown too much.  Rescan will still not be without cost, so it
will be annoying if it happens when the user did not make any

And it is annoying even more, if the user did make change in another
window.  You may make a change perhaps from the command line, write
a short e-mail about it to let others know in your MUA, and then
switch the focus back to git-gui to continue working.  Refreshing
upon git-gui getting focus is no better than manually pressing F5 or
whatever at that point.  It is too late at that point for spending
extra cycles without being asked without getting annoying to the user.

The right time to spend cycles (in the background) in the above
sample sequence is immediately after you made a change and switch to
your MUA---while you are typing a few paragraphs, you would not mind
git-gui spending seconds to repaint.

So probably a more productive use of our time, if we were to futz
with git-gui, would be to figure out how git-gui can have an
background idle process that notices a change in the repository and
refreshes but only when you are *not* interacting with it (if it
does things while you are interacting with it, it would become
annoying and distracting), I would guess.  Just when you come back
is the worst, and the most annoying, time to auto-refresh.

  parent reply	other threads:[~2019-07-29  5:10 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-07-28 15:17 Pratyush Yadav
2019-07-28 21:36 ` brian m. carlson
2019-07-28 22:10   ` Pratyush Yadav
2019-07-28 22:32     ` Pratyush Yadav
2019-07-28 22:49     ` brian m. carlson
2019-07-29  2:24       ` Mark Levedahl
2019-07-29  2:26       ` Mark Levedahl
2019-07-29  2:28       ` Mark Levedahl
2019-07-29  8:15         ` Pratyush Yadav
2019-07-31 19:42           ` Johannes Schindelin
2019-08-01 21:52             ` Pratyush Yadav
2019-08-02 12:39               ` Johannes Schindelin
2019-08-02 20:00                 ` Pratyush Yadav
2019-08-03 20:34                   ` Johannes Schindelin
2019-08-04 12:53                     ` Pratyush Yadav
2019-08-04 19:10                       ` Johannes Schindelin
2019-08-04 20:17                         ` Pratyush Yadav
2019-08-02 16:47               ` Junio C Hamano
2019-08-02 20:13                 ` Pratyush Yadav
2019-08-04 18:56                   ` Johannes Schindelin
2019-07-29  5:09       ` Junio C Hamano [this message]
2019-07-29  8:44         ` Pratyush Yadav
2019-07-28 21:44 ` 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:

  List information:

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \ \ \ \ \ \ \ \
    --subject='Re: [PATCH] git-gui: Perform rescan on window focus-in' \

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

Code repositories for project(s) associated with this inbox:

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