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

Re: a problem with git describe

From
Taylor Blau <me@ttaylorr.com>
Date
Apr 26, 2022, 15:50 UTC
Message-ID
<YmgUqbawbHGRTNBD@nand.local>
In-Reply-To
<nycvar.QRO.7.76.6.2204261730210.355@tvgsbejvaqbjf.bet>
On Tue, Apr 26, 2022 at 05:41:36PM +0200, Johannes Schindelin wrote:
> This idea to disable "just the unsafe parts" has come up before, and I do
> not really like it. It would change Git's behavior in inconsistent,
> hard-to-explain ways. For example, we would have to disable clean/smudge
> filters, which would then break, say, Git LFS.
I share your sentiment on the "don't read the unsafe parts" bit.

I think replacing our behavior from 2.35.2 from "bail on every execution of Git in an unowned directory not listed in safe.directory" to "emit a warning and don't read config/hooks in an unowned [...]" is a little friendlier in the sense that it would avoid breaking too many workflows without opening us up to the attack described and mitigate by that release.

A warning is definitely appropriate to tell users when we are and aren't reading config. I strongly dislike "read some parts of config and not others" though, since it seems (a) even harder to explain and inconsistent than this, and (b) extremely error prone and fragile in the sense that we are unlikely to completely enumerate every possible config -> execution path in git-config(1).

Thanks, Taylor

Previous: Johannes SchindelinNext: Johannes Schindelin
Message 21 of 23 in “a problem with git describe”
  1. Guy MaurelApr 23, 2022
  2. Philip OakleyApr 23, 2022
  3. Junio C HamanoApr 23, 2022
  4. Junio C HamanoApr 23, 2022
  5. Carlo Marcelo Arenas BelónApr 25, 2022
  6. SZEDER GáborApr 25, 2022
  7. Carlo Marcelo Arenas BelónApr 25, 2022
  8. Junio C HamanoApr 25, 2022
  9. Carlo Marcelo Arenas BelónApr 25, 2022
  10. Carlo Marcelo Arenas BelónApr 25, 2022
  11. Guy MaurelApr 25, 2022
  12. Johannes SchindelinApr 26, 2022
  13. rsbecker@nexbridge.comApr 26, 2022
  14. Carlo ArenasApr 26, 2022
  15. Junio C HamanoApr 26, 2022
  16. Carlo ArenasApr 26, 2022
  17. Johannes SchindelinApr 26, 2022
  18. Junio C HamanoApr 26, 2022
  19. Taylor BlauApr 26, 2022
  20. Johannes SchindelinApr 26, 2022
  21. Taylor BlauApr 26, 2022
  22. Johannes SchindelinApr 26, 2022
  23. Junio C HamanoApr 26, 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.