From: Dmitry Potapov <dpotapov@gmail.com>
To: Sergio Callegari <sergio.callegari@gmail.com>
Cc: Johannes Sixt <j.sixt@viscovery.net>,
Junio C Hamano <gitster@pobox.com>,
git@vger.kernel.org
Subject: Re: Some information that git diff saves and that git status does not
Date: Tue, 9 Mar 2010 11:20:29 +0300 [thread overview]
Message-ID: <20100309082029.GG31105@dpotapov.dyndns.org> (raw)
In-Reply-To: <4B95F183.7000708@gmail.com>
On Tue, Mar 09, 2010 at 07:58:11AM +0100, Sergio Callegari wrote:
>
> I actually did not know about the
>
> update-index --refresh
This is a plumbing commmand, which normally users should not use
directly, but when you copy your repo by hands or do something like
that, you may need it (or use "git diff").
>
> but now I have the relevant information its name sounds obvious.
> And I suspected something like inode data entering the game.
>
> As a matter of fact, I was obtaining the same effect with git diff.
Because "git diff" refreshes the cached stat information internally,
in the same way as "update-index --refresh". Junio wrote about this
recently:
http://article.gmane.org/gmane.comp.version-control.git/141708
>
> What was appearing to me as a quirk is that:
>
> 1) If you do not refresh the index, git works perfectly all the
> same. For instance, git status shows the right info. Only it is not
> that fast anymore, since everytime it needs to runs the filters on
> all the files.
> 2) git status does not refresh the index, while other commands like
> git diff do.
Historically, "git status" was just the dry-run mode of "git commit". I
do not think that "git commit" should refresh the index. But in Git 1.7,
"git status" is no longer the dry-run mode of "git commit", so I see no
reason why it does not refresh the cached stat info internally...
Dmitry
next prev parent reply other threads:[~2010-03-09 12:26 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-03-08 10:46 Some information that git diff saves and that git status does not Sergio
2010-03-08 21:38 ` Junio C Hamano
2010-03-09 6:35 ` Johannes Sixt
2010-03-09 6:56 ` Junio C Hamano
2010-03-09 6:58 ` Sergio Callegari
2010-03-09 8:20 ` Dmitry Potapov [this message]
2010-03-08 21:52 ` Jens Lehmann
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=20100309082029.GG31105@dpotapov.dyndns.org \
--to=dpotapov@gmail.com \
--cc=git@vger.kernel.org \
--cc=gitster@pobox.com \
--cc=j.sixt@viscovery.net \
--cc=sergio.callegari@gmail.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 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).