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

Re: fsck: BAD_FILEMODE diagnostic broken / never triggers

From
XMXavier Morel <xavier.morel@masklinn.net>
Date
Aug 10, 2022, 15:01 UTC
Message-ID
<6688857F-B899-4253-933B-0DFE25155D13@masklinn.net>
In-Reply-To
<YvLttyyaZWm4pitu@coredump.intra.peff.net>
>> We probably need to provide version of decode_tree_entry() which gives
>> the non-canonical mode, and to call it from fsck.
That makes sense.
> Perhaps something like the patch below.
I fear I'm really not able to judge so I'll let you fine folks decide on what to do.
> Note that these are treated with a severity of "warning", so fsck won't
> give a non-zero exit.

Yeah from what I understand it is classified as a warning already (just not emitted), like the zero padded filemodes. And that can be upgraded to error using fsck.msgid=error so shouldn't be an issue.

> I think it still enough for transfer.fsckObjects
> to mark them. I kind of wonder if fixing this at this point might create
> more problems than it solves though (e.g., if people have broken modes
> in historical objects that servers may now reject).

Maybe downgrade to info or ignore by default then? It might still be an issue for people who wilfully upgraded the diagnostic to error hoping to catch the, but hopefully if they did that they'd rather get the notice later than never?

That's pretty much the `-Werror` problem (or one of them anyway)
Previous: Jeff KingNext: Jeff King
Message 4 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.