git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
From: "brian m. carlson" <sandals@crustytoothpaste.net>
To: Pratyush Yadav <me@yadavpratyush.com>
Cc: git <git@vger.kernel.org>,
	Christian Couder <christian.couder@gmail.com>,
	Johannes Schindelin <Johannes.Schindelin@gmx.de>
Subject: Re: [PATCH] git-gui: Perform rescan on window focus-in
Date: Sun, 28 Jul 2019 22:49:44 +0000	[thread overview]
Message-ID: <20190728224943.GC162590@genre.crustytoothpaste.net> (raw)
In-Reply-To: <e3f296a6-f33b-7b52-c4cb-9acf65145e64@yadavpratyush.com>

[-- Attachment #1: Type: text/plain, Size: 1616 bytes --]

On 2019-07-28 at 22:10:29, Pratyush Yadav wrote:
> The function is not documented, and I only started spelunking the code a
> couple days back, so I'll try to answer with what I know. It might not be
> the full picture.
> 
> Running git-gui --trace, these commands are executed during a rescan:
> 
> /usr/lib/git-core/git-rev-parse --verify HEAD
> /usr/lib/git-core/git-update-index -q --unmerged --ignore-missing --refresh
> 
> Since I'm not too familiar with the details of these, I'll let you be the
> judge on how expensive these operations are. But I'll add that rescans are
> pretty fast on my relatively slow hard disk.

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.

> I'm never too sure what I should put in the commit message, so I took the
> conservative route. I'll add more details in the v2 patch.

Great. This sounds like a well-reasoned change. I'll let other folks who
use git-gui more chime in to see what they think as well.
-- 
brian m. carlson: Houston, Texas, US
OpenPGP: https://keybase.io/bk2204

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 868 bytes --]

  parent reply	other threads:[~2019-07-28 22:50 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-07-28 15:17 [PATCH] git-gui: Perform rescan on window focus-in 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 [this message]
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
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:
  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=20190728224943.GC162590@genre.crustytoothpaste.net \
    --to=sandals@crustytoothpaste.net \
    --cc=Johannes.Schindelin@gmx.de \
    --cc=christian.couder@gmail.com \
    --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).