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

Re: [PATCH 1/3] tree-walk: be more specific about corrupt tree errors

From
Junio C Hamano <gitster@pobox.com>
Date
Sep 27, 2016, 04:01 UTC
Message-ID
<xmqqtwd2ng8k.fsf@gitster.mtv.corp.google.com>
In-Reply-To
<1474935093-26757-1-git-send-email-dturner@twosigma.com>
David Turner <dturner@twosigma.com> writes:
Show 24 quoted lines
> From: Jeff King <peff@peff.net>
>
> When the tree-walker runs into an error, it just calls
> die(), and the message is always "corrupt tree file".
> However, we are actually covering several cases here; let's
> give the user a hint about what happened.
>
> Let's also avoid using the word "corrupt", which makes it
> seem like the data bit-rotted on disk. Our sha1 check would
> already have found that. These errors are ones of data that
> is malformed in the first place.
>
> Signed-off-by: David Turner <dturner@twosigma.com>
> Signed-off-by: Jeff King <peff@peff.net>
> ---
>  t/t1007-hash-object.sh           |  15 +++++++++++++--
>  t/t1007/.gitattributes           |   1 +
>  t/t1007/tree-with-empty-filename | Bin 0 -> 28 bytes
>  t/t1007/tree-with-malformed-mode | Bin 0 -> 39 bytes
>  tree-walk.c                      |  12 +++++++-----
>  5 files changed, 21 insertions(+), 7 deletions(-)
>  create mode 100644 t/t1007/.gitattributes
>  create mode 100644 t/t1007/tree-with-empty-filename
>  create mode 100644 t/t1007/tree-with-malformed-mode

I hate to report this, but this alone, or together with 2/2, when merged to 'pu', I cannot get them to pass the tests in my automated integration tests, even though they seem to pass when the problematic tests are run manually. I do not see offhand anything suspicious (like something that may be racy) in these two patches but I haven't figured out where it goes wrong.

If somebody manages to find breakages in today's 'pu', please (1) do not be too alarmed, and (2) help figure out where things are broken.

Thanks.
Previous: David TurnerNext: Jeff King
Message 5 of 6 in “tree-walk: be more specific about corrupt tree errors”
  1. 1/3 tree-walk: be more specific about corrupt tree errorsDavid Turner, Sep 27, 2016
  2. 2/3 fsck: handle bad trees like other errorsDavid Turner, Sep 27, 2016
  3. 3/3 add David Turner's Two Sigma addressDavid Turner, Sep 27, 2016
  4. David TurnerSep 27, 2016
  5. Junio C HamanoSep 27, 2016
  6. Jeff KingSep 27, 2016

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.