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

Re: [PATCH] read-cache: call verify_hdr() in a background thread

From
Jonathan Nieder <jrnieder@gmail.com>
Date
Mar 24, 2017, 17:53 UTC
Message-ID
<20170324175310.GC31294@aiede.mtv.corp.google.com>
In-Reply-To
<23685f59-138f-51c8-61f4-6f46d153ff89@jeffhostetler.com>
Jeff Hostetler wrote:
> On 3/24/2017 12:35 PM, Jonathan Nieder wrote:
Show 6 quoted lines
>> What happens if there is an error before the code reaches the end of
>> the function?  I think there needs to be a verify_hdr_finish call in
>> the 'unmap:' cleanup section.
>
> But the "unmap" section calls die().  Do need to join first ??
> (It's OK if we do, just asking.)
Good point.  Now I wonder why the 'unmap:' section exists at all.
	$ git log -Sunmap: read-cache.c 
	commit e83c5163316f89bfbde7d9ab23ca2e25604af290
	Author: Linus Torvalds <torvalds@ppc970.osdl.org>
	Date:   Thu Apr 7 15:13:13 2005 -0700
	    Initial revision of "git", the information manager from hell

So the unmap: section has been there since day one. At that point it used 'return error(...)', so it made more sense. Where did the die() come from, then?

	commit 5d1a5c02e8ac1c16688ea4a44512245f25a49f8a
	Author: Linus Torvalds <torvalds@osdl.org>
	Date:   Sat Oct 1 13:24:27 2005 -0700
	    [PATCH] Better error reporting for "git status"

I think it should be safe to eliminate the 'unmap' section altogether and that that change just forgot to, but in any case it's orthogonal to your patch.

Thanks and sorry for the confusion, Jonathan

Previous: Jeff Hostetler
Message 7 of 7 in “read-cache: call verify_hdr() in a background thread”
  1. read-cache: call verify_hdr() in a background threadgit@jeffhostetler.com, Mar 24, 2017
  2. read-cache: call verify_hdr() in a background threadgit@jeffhostetler.com, Mar 24, 2017
  3. Jeff KingMar 24, 2017
  4. Jeff HostetlerMar 24, 2017
  5. Jonathan NiederMar 24, 2017
  6. Jeff HostetlerMar 24, 2017
  7. Jonathan NiederMar 24, 2017

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.