From: David Kastrup <dak@gnu.org>
To: Johannes Schindelin <Johannes.Schindelin@gmx.de>
Cc: Jeff King <peff@peff.net>, Junio C Hamano <gitster@pobox.com>,
git@vger.kernel.org,
"Michael S. Tsirkin" <mst@dev.mellanox.co.il>
Subject: Re: [PATCH] diff: resurrect the traditional empty "diff --git" behaviour
Date: Fri, 31 Aug 2007 23:20:17 +0200 [thread overview]
Message-ID: <85lkbrbdv2.fsf@lola.goethe.zz> (raw)
In-Reply-To: <Pine.LNX.4.64.0708312154530.28586@racer.site> (Johannes Schindelin's message of "Fri\, 31 Aug 2007 21\:57\:29 +0100 \(BST\)")
Johannes Schindelin <Johannes.Schindelin@gmx.de> writes:
> On Fri, 31 Aug 2007, Jeff King wrote:
>
>> On Fri, Aug 31, 2007 at 01:13:42PM -0700, Junio C Hamano wrote:
>>
>> > If you set diff.autorefreshindex configuration variable, it
>> > squelches the empty "diff --git" output, and at the end of the
>> > command, it automatically runs "update-index --refresh" without
>> > even bothering the user. In other words, with the configuration
>> > variable set, people who do not care about the cache-dirtyness
>> > do not even have to see the warning.
>>
>> Nice. This is much more sane behavior, IMHO, and I think it should make
>> everyone happy.
>
> I could even imagine that this will eventually become the standard
> behaviour.
>
>> > Same here. This patch saw only very light testing, but I
>> > personally think is a sane thing to do before 1.5.3 final.
>>
>> Passes my light testing as well, but I have a feeling we just tested the
>> same things...;)
>>
>> One question on the implementation (and remember that I am somewhat
>> ignorant of the structure of this part of the code, so the answer may be
>> "it's too ugly"): is there a good reason to refresh _after_ the diff?
>
> We do not need to do it always. After the diff, we know if the
> index needs refreshing. Before, we don't.
Hm. At the moment where it is first noticed, it should be still
possible to start a refresh. Is there a particular gain to be
expected? One thing I could think of is that when using a pager, the
diff might often die of SIGPIPE before being able to refresh.
>> It seems like when we are looking through the working tree and
>> index the first time, we notice that the stat information doesn't
>> match; why can't we update it then? That would save an extra
>> working tree traversal.
>
> But that would be intrusive in the diff machinery IMHO. It should
> stay as read-only as possible.
Hm. Not sure where the gain is in that, if a refresh is done, anyway.
--
David Kastrup, Kriemhildstr. 15, 44793 Bochum
next prev parent reply other threads:[~2007-08-31 21:20 UTC|newest]
Thread overview: 26+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-08-30 6:38 parallel make problem with git Michael S. Tsirkin
2007-08-30 6:46 ` Junio C Hamano
2007-08-30 6:50 ` Michael S. Tsirkin
2007-08-30 7:27 ` [PATCH] fix parallel make problem Michael S. Tsirkin
2007-08-31 2:02 ` Junio C Hamano
2007-08-31 8:06 ` Michael S. Tsirkin
2007-08-31 8:12 ` Junio C Hamano
2007-08-31 8:15 ` Michael S. Tsirkin
2007-08-31 8:36 ` Junio C Hamano
2007-08-31 15:21 ` Michael S. Tsirkin
2007-08-31 15:44 ` Junio C Hamano
2007-08-31 16:00 ` Michael S. Tsirkin
2007-08-31 16:11 ` Johannes Schindelin
2007-08-31 16:01 ` Junio C Hamano
2007-08-31 16:03 ` Jeff King
2007-08-31 20:13 ` [PATCH] diff: resurrect the traditional empty "diff --git" behaviour Junio C Hamano
2007-08-31 20:32 ` Jeff King
2007-08-31 20:57 ` Johannes Schindelin
2007-08-31 21:16 ` Junio C Hamano
2007-08-31 21:30 ` Johannes Schindelin
2007-08-31 21:20 ` David Kastrup [this message]
2007-08-31 21:32 ` Alex Riesen
2007-08-31 22:37 ` Steven Grimm
2007-09-01 1:27 ` Junio C Hamano
2007-09-03 8:09 ` Matthieu Moy
2007-09-03 8:36 ` Junio C Hamano
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=85lkbrbdv2.fsf@lola.goethe.zz \
--to=dak@gnu.org \
--cc=Johannes.Schindelin@gmx.de \
--cc=git@vger.kernel.org \
--cc=gitster@pobox.com \
--cc=mst@dev.mellanox.co.il \
--cc=peff@peff.net \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.