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

Re: [PATCH 3/3] fsck: downgrade tree badFilemode to "info"

From
Junio C Hamano <gitster@pobox.com>
Date
Aug 11, 2022, 16:24 UTC
Message-ID
<xmqqh72ihhnw.fsf@gitster.g>
In-Reply-To
<YvS+x35sxXmO5H1h@coredump.intra.peff.net>
Jeff King <peff@peff.net> writes:
> I agree with the "it was so long ago it does not matter", but for the
> sake of posterity, here's what my digging found:
> ...

That's indeed an ancient history. Thanks for a funny find. I forgot all about the linked list of tree entries.

> Again, probably not important, but it was interesting for me at least to
> see the evolution of the tree code. Most of those changes predate my
> involvement with the code.

Yeah, your name didn't appear in the history leading to the version with linked list of tree entries, but by the time it was converted to more modern "update_tree_entry()" interface, you had a handful of commits already.

The main codepath never cared about zero-padded octal (we used to use sscanf "%o", and these days get_mode() does it manually), but there used to be Git implementations that zero-padded the mode (e.g. "040000") that we need to warn about. Both in code before and after 15b5536ee4, we peek into the bytes directly and check '0', independent from parsing the octal string into 'mode'. I found that interesting (no, there is nothing to fix, just a fun read).

Thanks.
Previous: Jeff KingNext: Ævar Arnfjörð Bjarmason
Message 15 of 17 in “fsck: BAD_FILEMODE diagnostic broken / never triggers”
  1. Xavier MorelAug 6, 2022
  2. Jeff KingAug 9, 2022
  3. Jeff KingAug 9, 2022
  4. Xavier MorelAug 10, 2022
  5. Jeff KingAug 10, 2022
  6. 0/3 actually detect bad file modes in fsckJeff King, Aug 10, 2022
  7. 1/3 tree-walk: add a mechanism for getting non-canonicalized modesJeff King, Aug 10, 2022
  8. 2/3 fsck: actually detect bad file modes in treesJeff King, Aug 10, 2022
  9. Junio C HamanoAug 10, 2022
  10. Jeff KingAug 10, 2022
  11. Junio C HamanoAug 10, 2022
  12. 3/3 fsck: downgrade tree badFilemode to "info"Jeff King, Aug 10, 2022
  13. Junio C HamanoAug 10, 2022
  14. Jeff KingAug 11, 2022
  15. Junio C HamanoAug 11, 2022
  16. Ævar Arnfjörð BjarmasonAug 11, 2022
  17. Jeff KingAug 14, 2022

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.