git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Junio C Hamano <gitster@pobox.com>
To: Kirill Smelkov <kirr@landau.phys.spbu.ru>
Cc: Junio C Hamano <gitster@pobox.com>, Jeff King <peff@peff.net>,
	git@vger.kernel.org, Axel Bonnet <axel.bonnet@ensimag.imag.fr>,
	Cl??ment Poulain <clement.poulain@ensimag.imag.fr>,
	Diane Gasselin <diane.gasselin@ensimag.imag.fr>
Subject: Re: [PATCH 2/2] fill_textconv(): Don't get/put cache if sha1 is not valid
Date: Sun, 19 Dec 2010 18:41:22 -0800	[thread overview]
Message-ID: <7vd3oxdv3h.fsf@alter.siamese.dyndns.org> (raw)
In-Reply-To: <20101219121059.GA10985@landau.phys.spbu.ru> (Kirill Smelkov's message of "Sun\, 19 Dec 2010 15\:10\:59 +0300")

Kirill Smelkov <kirr@landau.phys.spbu.ru> writes:

> On Sat, Dec 18, 2010 at 07:23:29PM -0800, Junio C Hamano wrote:
>> Kirill Smelkov <kirr@landau.phys.spbu.ru> writes:
>> 
>> > Thanks for your ACK and for the explanation.
>> >
>> > My last patches to git were blame related so semi-intuitively I knew
>> > that invalid sha1 are coming from files in worktree. Your description
>> > makes things much more clear and I'd put it into patch log as well.
>> > What is the best practice for this? For me to re-roll, or for Junio to
>> > merge texts?
>> 
>> Re-rolling to explain changes in your own words is preferred; thanks.
>
> I see, thanks.
>
> I'm not that familiar with git internals involved, so here is updated
> patch with added paragraph about "df->sha1_valid=0 means files from
> worktree with unknown sha1", and appropriate excerpt from Jeff's post.
> That's the most reasonable I could come up with.
>
> Thanks,
> Kirill
>
> P.S. please don't forget to pick patch 1 which is unchanged.

Here is how I would describe it.

commit 87bb04bb760659dd33d7a173333329cd900620a9
Author: Kirill Smelkov <kirr@landau.phys.spbu.ru>
Date:   Sat Dec 18 17:54:12 2010 +0300

    fill_textconv(): Don't get/put cache if sha1 is not valid
    
    When blaming files in the working tree, the filespec is marked with
    !sha1_valid, as we have not given the contents an object name yet.  The
    function to cache textconv results (keyed on the object name), however,
    didn't check this condition, and ended up on storing the cached result
    under a random object name.
    
    Signed-off-by: Kirill Smelkov <kirr@landau.phys.spbu.ru>

  reply	other threads:[~2010-12-20  2:41 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-12-18 14:54 [PATCH 1/2] t/t8006: Demonstrate blame is broken when cachetextconv is on Kirill Smelkov
2010-12-18 14:54 ` [PATCH 2/2] fill_textconv(): Don't get/put cache if sha1 is not valid Kirill Smelkov
2010-12-18 16:13   ` Jeff King
2010-12-18 20:55     ` Kirill Smelkov
2010-12-19  3:23       ` Junio C Hamano
2010-12-19 12:10         ` Kirill Smelkov
2010-12-20  2:41           ` Junio C Hamano [this message]
2010-12-20  4:46             ` Jeff King
2010-12-20 19:28               ` Kirill Smelkov
2010-12-20  2:26     ` Junio C Hamano
2010-12-20  4:42       ` Jeff King
2010-12-20  8:42         ` Junio C Hamano
2010-12-20  2:32   ` 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=7vd3oxdv3h.fsf@alter.siamese.dyndns.org \
    --to=gitster@pobox.com \
    --cc=axel.bonnet@ensimag.imag.fr \
    --cc=clement.poulain@ensimag.imag.fr \
    --cc=diane.gasselin@ensimag.imag.fr \
    --cc=git@vger.kernel.org \
    --cc=kirr@landau.phys.spbu.ru \
    --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 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).