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

Re: [PATCH] fsck.c: fix bogus "empty tree" check

From
Junio C Hamano <gitster@pobox.com>
Date
Mar 4, 2008, 19:57 UTC
Message-ID
<7vfxv65kkl.fsf@gitster.siamese.dyndns.org>
In-Reply-To
<20080304152635.40451f7c.vsu@altlinux.ru>
Sergey Vlasov <vsu@altlinux.ru> writes:
Show 22 quoted lines
>>    I'll revert the following two commits for now:
>>
>>    d5ef408 (unpack-objects: prevent writing of inconsistent objects)
>>    28f72a0 (receive-pack: use strict mode for unpacking objects)
>>
>>    as I have verified that running with receive.fsckobjects set to false
>>    fixes the issues for me, and the repository at the receiving end (both
>>    before and after the push) pass git-fsck without problems.  Needless to
>>    say, I am not a happy camper right now.
>
> This part of commit d5ef408 changes is bogus:
>
>> @@ -144,9 +205,36 @@ static void added_object(unsigned nr, enum object_type type,
>>  static void write_object(unsigned nr, enum object_type type,
>>  			 void *buf, unsigned long size)
>>  {
>> -	if (write_sha1_file(buf, size, typename(type), obj_list[nr].sha1) < 0)
>> -		die("failed to write object");
>>  	added_object(nr, type, buf, size);
>
> The write_sha1_file() call here was calculating obj_list[nr].sha1; now
> it is removed, but added_object() needs this value:
Thanks, somehow I missed that when merging it up for 'next'.
> However, I do not have time to create a proper test case for this.

That's Ok. What we need is a fix but it is not that urgent as the stuff is now reverted for now.

Sorry for being a sloppy maintainer. I have to admit that I did not read every single line of patches in a few topics merged to 'master' recently, due to workload pressure, and some extra eyeballs after-the-fact are greatly appreciated.

Previous: Sergey VlasovNext: Junio C Hamano
Message 3 of 6 in “fsck.c: fix bogus "empty tree" check”
  1. fsck.c: fix bogus "empty tree" checkJunio C Hamano, Mar 4, 2008
  2. Sergey VlasovMar 4, 2008
  3. Junio C HamanoMar 4, 2008
  4. t5300: add test for "unpack-objects --strict"Junio C Hamano, Mar 5, 2008
  5. t5300: add test for "unpack-objects --strict"Junio C Hamano, Mar 5, 2008
  6. Martin KoeglerMar 4, 2008

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.