git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [PATCH 2/2] fill_textconv(): Don't get/put cache if sha1 is not valid

From
Junio C Hamano <gitster@pobox.com>
Date
Dec 20, 2010, 02:41 UTC
Message-ID
<7vd3oxdv3h.fsf@alter.siamese.dyndns.org>
In-Reply-To
<20101219121059.GA10985@landau.phys.spbu.ru>
Kirill Smelkov <kirr@landau.phys.spbu.ru> writes:
Show 24 quoted lines
> 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>
Previous: Kirill SmelkovNext: Jeff King
Message 7 of 13 in “t/t8006: Demonstrate blame is broken when cachetextconv is on”
  1. 1/2 t/t8006: Demonstrate blame is broken when cachetextconv is onKirill Smelkov, Dec 18, 2010
  2. 2/2 fill_textconv(): Don't get/put cache if sha1 is not validKirill Smelkov, Dec 18, 2010
  3. Jeff KingDec 18, 2010
  4. Kirill SmelkovDec 18, 2010
  5. Junio C HamanoDec 19, 2010
  6. Kirill SmelkovDec 19, 2010
  7. Junio C HamanoDec 20, 2010
  8. Jeff KingDec 20, 2010
  9. Kirill SmelkovDec 20, 2010
  10. Junio C HamanoDec 20, 2010
  11. Jeff KingDec 20, 2010
  12. Junio C HamanoDec 20, 2010
  13. Junio C HamanoDec 20, 2010

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.