From: "J. Bruce Fields" <bfields@fieldses.org>
To: David Kastrup <dak@gnu.org>
Cc: git@vger.kernel.org
Subject: Re: [PATCH] Add --show-touched option to show "diff --git" line when contents are unchanged
Date: Tue, 7 Aug 2007 09:34:58 -0400 [thread overview]
Message-ID: <20070807133458.GA19834@fieldses.org> (raw)
In-Reply-To: <86k5s7am7c.fsf@lola.quinscape.zz>
On Tue, Aug 07, 2007 at 08:32:55AM +0200, David Kastrup wrote:
> Junio C Hamano <gitster@pobox.com> writes:
>
> > Matthieu Moy <Matthieu.Moy@imag.fr> writes:
> >
> >> Unfortunately, the patch solves the "large and irrelevant output"
> >> of git-diff, but not the performance problem (see the rest of the
> >> thread, I failed to convince Junio that updating the index was a
> >> performance improvement while keeping the same user semantics).
> >
> > That's what update-index --refresh (or status if you insist) are
> > for, and the coalmine canary you are so dead set to kill are helping
> > you realize the need for running.
>
> That does not convince me. Cache staleness should be a problem of
> git, not of the user. In particular if the user is just using
> porcelain. If letting the cache get stale impacts performance, then
> git should clean up its act on its own without barfing when using
> unrelated commands. If it notices this during diff (presumably by
> overstepping some staleness ratio), then it can set a "regenerate on
> next opportunity" flag on the index, and then the next command wanting
> to process the index from the start can rewrite a refreshed version.
The last time I had a serious problem with "cache staleness", it was
with Beagle, which modifies the files it indexes (by writing some
extended attributes). I figured out what was happening when I noticed
that the list of touched files was growing each time I did a diff
(implying the something was working on them right then), so I ran top,
noticed beagled, eventually thought to query the extended attributes,
and finally turned off beagled's indexing to solve the problem.
So, in this case:
- If git had fixed up the problem silently, I probably would
have just assumed git was slow and not found the problem.
- Seeing the actual list of files for which the index was dirty
helped me identify the problem. I probably would have
eventually figured it out even if all I'd had was a single
"index is stale" message, but I suspect it would have taken
longer.
Draw whatever moral you'd like....
--b.
next prev parent reply other threads:[~2007-08-07 13:35 UTC|newest]
Thread overview: 75+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-08-01 16:17 git-diff on touched files: bug or feature? Matthieu Moy
2007-08-01 17:26 ` Junio C Hamano
2007-08-01 19:02 ` Alexandre Julliard
2007-08-01 19:07 ` Junio C Hamano
2007-08-01 19:17 ` Alexandre Julliard
2007-08-02 9:23 ` Matthieu Moy
2007-08-02 9:51 ` Johannes Schindelin
2007-08-02 9:57 ` Matthieu Moy
2007-08-02 10:48 ` Johannes Schindelin
2007-08-02 14:04 ` Jean-François Veillette
2007-08-02 14:43 ` Johannes Schindelin
2007-08-02 15:10 ` Steven Grimm
2007-08-02 15:23 ` Johannes Schindelin
2007-08-02 15:45 ` Matthieu Moy
2007-08-02 17:58 ` J. Bruce Fields
2007-08-03 5:37 ` [PATCH] Add --show-touched option to show "diff --git" line when contents are unchanged Steven Grimm
2007-08-03 6:30 ` Junio C Hamano
2007-08-03 10:23 ` Johannes Schindelin
2007-08-03 20:33 ` Junio C Hamano
2007-08-03 21:32 ` Matthieu Moy
2007-08-03 21:50 ` Junio C Hamano
2007-08-03 23:01 ` Matthieu Moy
2007-08-03 23:36 ` Junio C Hamano
2007-08-05 19:42 ` Matthieu Moy
2007-08-05 19:45 ` Johannes Schindelin
2007-08-05 19:57 ` Matthieu Moy
2007-08-06 15:56 ` Matthias Lederhofer
2007-08-06 16:10 ` David Kastrup
2007-08-06 16:16 ` David Kastrup
2007-08-06 20:05 ` Matthieu Moy
2007-08-06 20:34 ` Junio C Hamano
2007-08-07 6:32 ` David Kastrup
2007-08-07 13:34 ` J. Bruce Fields [this message]
2007-08-07 4:22 ` Linus Torvalds
2007-08-07 4:37 ` Junio C Hamano
2007-08-07 6:41 ` David Kastrup
2007-08-08 3:07 ` Linus Torvalds
2007-08-08 3:44 ` Junio C Hamano
2007-08-08 8:26 ` Johannes Schindelin
2007-08-08 8:43 ` Junio C Hamano
2007-08-08 9:13 ` David Kastrup
2007-08-08 9:23 ` Johannes Schindelin
2007-08-08 9:58 ` Jakub Narebski
2007-08-07 5:56 ` Steven Grimm
2007-08-07 5:57 ` [PATCH] Add a note about the index being updated by git-status in some cases Steven Grimm
2007-08-07 6:35 ` [PATCH] git-diff: Output a warning about stale files in the index Steven Grimm
2007-08-07 6:46 ` Junio C Hamano
2007-08-07 7:17 ` [PATCH v2] " Steven Grimm
2007-08-07 7:46 ` Junio C Hamano
2007-08-07 7:51 ` Steven Grimm
2007-08-07 9:04 ` Jakub Narebski
2007-08-11 20:07 ` Junio C Hamano
2007-08-08 3:42 ` [PATCH] Add --show-touched option to show "diff --git" line when contents are unchanged Linus Torvalds
2007-08-07 6:39 ` Steven Grimm
2007-08-07 6:47 ` Matthieu Moy
2007-08-02 20:50 ` git-diff on touched files: bug or feature? Junio C Hamano
2007-08-02 9:54 ` Junio C Hamano
2007-08-02 10:01 ` Junio C Hamano
2007-08-02 12:08 ` Matthieu Moy
2007-08-02 12:21 ` Johannes Schindelin
2007-08-02 19:56 ` Junio C Hamano
2007-08-03 7:04 ` Jeff King
2007-08-03 7:59 ` Junio C Hamano
2007-08-03 8:24 ` Jeff King
2007-08-03 8:57 ` Junio C Hamano
2007-08-03 8:40 ` Shawn O. Pearce
2007-08-03 9:13 ` Junio C Hamano
2007-08-02 12:05 ` Matthieu Moy
2007-08-02 12:19 ` Johannes Schindelin
2007-08-02 12:26 ` Matthieu Moy
2007-08-02 14:39 ` Johannes Schindelin
2007-08-02 14:49 ` Matthieu Moy
2007-08-02 15:12 ` Johannes Schindelin
2007-08-02 13:25 ` Joel Reed
2007-08-02 15:05 ` Johannes Schindelin
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=20070807133458.GA19834@fieldses.org \
--to=bfields@fieldses.org \
--cc=dak@gnu.org \
--cc=git@vger.kernel.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).