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

Re: [PATCH 2/2] fsck: detect and warn a commit with embedded NUL

From
Junio C Hamano <gitster@pobox.com>
Date
Apr 14, 2016, 19:04 UTC
Message-ID
<xmqqlh4gf1vh.fsf@gitster.mtv.corp.google.com>
In-Reply-To
<20160414182900.GD22068@sigill.intra.peff.net>
Jeff King <peff@peff.net> writes:
> But I do agree in general that we should be checking as many things as
> we can.

I was about to say "I agree with that in principle, but there are cases where you would want to say 'if the object does not pass even this basic check, it is not worth validating it further', and verify-headers may fall into that category". That's another way of saying that something that we cannot even parse into constituent fields we cannot check the validity of each field for the semantics.

However, with the current "violations of various classes can be configured out" way of doing things, that is a difficult stance to take. If you choose to accept syntax violation that makes us unable to parse, you must accept warnings and errors coming from "missing" fields due to our inability to parse and your telling us to proceed anyway.

So in the end, I do agree that we should be checking as many things as we can.

Previous: Jeff KingNext: Jeff King
Message 6 of 13 in “fsck_commit_buffer(): do not special case the last validation”
  1. 1/2 fsck_commit_buffer(): do not special case the last validationJunio C Hamano, Apr 14, 2016
  2. 2/2 fsck: detect and warn a commit with embedded NULJunio C Hamano, Apr 14, 2016
  3. Jeff KingApr 14, 2016
  4. Junio C HamanoApr 14, 2016
  5. Jeff KingApr 14, 2016
  6. Junio C HamanoApr 14, 2016
  7. Jeff KingApr 14, 2016
  8. Junio C HamanoApr 14, 2016
  9. Johannes SchindelinApr 15, 2016
  10. Jeff KingApr 14, 2016
  11. Junio C HamanoApr 14, 2016
  12. Johannes SchindelinApr 15, 2016
  13. Junio C HamanoApr 15, 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.