git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Junio C Hamano <gitster@pobox.com>
To: Daniel Barkalow <barkalow@iabervon.org>
Cc: Johannes Schindelin <Johannes.Schindelin@gmx.de>, git@vger.kernel.org
Subject: Re: [PATCH 2/9] Add flag to make unpack_trees() not print errors.
Date: Tue, 05 Feb 2008 15:43:55 -0800	[thread overview]
Message-ID: <7v7ihj7yv8.fsf@gitster.siamese.dyndns.org> (raw)
In-Reply-To: alpine.LNX.1.00.0802051439200.13593@iabervon.org

Daniel Barkalow <barkalow@iabervon.org> writes:

> On Tue, 5 Feb 2008, Johannes Schindelin wrote:
> ...
>> > Additionally, if unpack_trees() returns with an error, but without 
>> > printing anything, it will roll back any changes to the index (by 
>> > rereading the index, currently). This obviously could be done by the 
>> > caller, but chances are that the caller would forget and debugging this 
>> > is difficult.
>> 
>> Granted, it is easy to forget.  But maybe the caller does not need the 
>> index?  Or maybe it wants a different one?  I'd prefer the caller to clean 
>> up, if necessary.
>
> That's what makes it "gently" instead of just "silent"; it has no effect 
> if it doesn't succeed. Longer term, I'd like to have unpack_trees() unpack 
> into a separate index, which should actually be faster (since it doesn't 
> have to keep shifting the entries in the index it's working on) and make 
> this moot.

Absolutely.  That is the original motivation I did the_index
thing for.

But "re-reading" may not be quite nice.  It would defeat the
optimization introduced by the change to use CE_UPTODATE flag to
avoid unnecessary lstat(2) calls.

  reply	other threads:[~2008-02-06  0:35 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-02-04 18:35 [PATCH 2/9] Add flag to make unpack_trees() not print errors Daniel Barkalow
2008-02-05  1:16 ` Johannes Schindelin
2008-02-05 20:38   ` Daniel Barkalow
2008-02-05 23:43     ` Junio C Hamano [this message]
2008-02-06  1:11       ` Daniel Barkalow
  -- strict thread matches above, loose matches on Subject: below --
2008-01-25 23:24 Daniel Barkalow

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=7v7ihj7yv8.fsf@gitster.siamese.dyndns.org \
    --to=gitster@pobox.com \
    --cc=Johannes.Schindelin@gmx.de \
    --cc=barkalow@iabervon.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).