From: Thomas Rast <trast@student.ethz.ch>
To: Jeff King <peff@peff.net>
Cc: Junio C Hamano <gitster@pobox.com>,
Fredrik Gustafsson <iveqy@iveqy.com>, <spearce@spearce.org>,
<git@vger.kernel.org>, <pclouds@gmail.com>
Subject: Re: [RFC] Add posibility to preload stat information.
Date: Thu, 21 Mar 2013 11:41:48 +0100 [thread overview]
Message-ID: <87vc8lyqz7.fsf@pctrast.inf.ethz.ch> (raw)
In-Reply-To: <20130320174759.GA29349@sigill.intra.peff.net> (Jeff King's message of "Wed, 20 Mar 2013 13:47:59 -0400")
Jeff King <peff@peff.net> writes:
> On Wed, Mar 20, 2013 at 10:15:39AM -0700, Junio C Hamano wrote:
>
>> Jeff King <peff@peff.net> writes:
>>
>> > So maybe just run "git status >/dev/null"?
>>
>> In the background? How often would it run? I do not think a single
>> lockfile solves anything. It may prevent simultaneous runs of two
>> such "prime the well" processes, but the same user may be working in
>> two separate repositories.
>
> Yes, in the background (he invokes __git_recursive_stat already in the
> background). I'd think you would want to run it whenever you enter a
> repository.
>
>> I do not see anything that prevents it from running in the same
>> repository over and over again, either. "prompt" is a bad place to
>> do this kind of thing.
>
> Yeah, I did not look closely at that. The commit message claims "When
> entering a git working dir", but the implementation runs it on each
> prompt invocation, which is awful. I think you'd want to check to use
> rev-parse to see if you have changed into a new git repo, and only run
> it once then.
I think it would actually be a somewhat interesting feature if it
interacted with GIT_PS1_SHOW*. If you use these settings (I personally
use SHOWDIRTYSTATE but not SHOWUNTRACKEDFILES), the prompt hangs while
__git_ps1 runs git-status. It should be possible to run a git-status
process in the background when entering a repository, and displaying
some marker ('??' maybe) in the prompt instead of the dirty-state info
until git-status has finished. That way the user doesn't have his shell
blocked by cding to a big repo.
--
Thomas Rast
trast@{inf,student}.ethz.ch
next prev parent reply other threads:[~2013-03-21 10:42 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-03-20 12:15 [RFC] Add posibility to preload stat information Fredrik Gustafsson
2013-03-20 16:48 ` Jeff King
2013-03-20 17:15 ` Junio C Hamano
2013-03-20 17:47 ` Jeff King
2013-03-21 10:41 ` Thomas Rast [this message]
2013-03-21 14:44 ` Junio C Hamano
2013-03-30 19:42 ` Phil Hord
2013-03-20 18:40 ` Fredrik Gustafsson
2013-03-20 17:15 ` Ramkumar Ramachandra
2013-03-20 17:41 ` Fredrik Gustafsson
2013-03-20 17:49 ` Ramkumar Ramachandra
2013-03-20 18:36 ` Fredrik Gustafsson
2013-03-20 18:46 ` Jeff King
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=87vc8lyqz7.fsf@pctrast.inf.ethz.ch \
--to=trast@student.ethz.ch \
--cc=git@vger.kernel.org \
--cc=gitster@pobox.com \
--cc=iveqy@iveqy.com \
--cc=pclouds@gmail.com \
--cc=peff@peff.net \
--cc=spearce@spearce.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).