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

Re: [RFC] Define "precious" attribute and support it in `git clean`

From
Sebastian Thiel <sebastian.thiel@icloud.com>
Date
Oct 14, 2023, 07:30 UTC
Message-ID
<9815705C-EF59-473F-A119-DE84C0E16A89@icloud.com>
In-Reply-To
<xmqqfs2e3292.fsf@gitster.g>
On 13 Oct 2023, at 18:39, Junio C Hamano wrote:
> Come to think of it, we might be able to retrofit '!' without too
> much damage.  Something like "!unignored" is now a deprecated but
> still supported way to say "!!unignored", "!*precious" is new, and
> "\!anything" is a pathname that begins with '!'.

I don't know anything about statistics, and I don't which of the proposed syntax thus far has the lowest probability of accidental breakage, possibly in combination with the best possible usability.

However, I do like even more the idea to retro-fit `!` instead of having an entirely new prefix, it seems more intuitive to me.

An apparent disadvantage would be that using `!` prefix with backwards-compatibility will make any additional future modifier more breaking. For instance `!*` is potentially ignoring an additional file in old git, and another `!-` modifier is having the same effect.

Chances for this are probably low though, but if in doubt it would be possible to check certain patterns against all files of the top-3.5TB of GitHub repositories.

Using `!*` to signal precious files also seems like a less likely path prefix than `!$` would be, but then again, it's just a guess which most definitely doesn't have much bearing.

I personally also like this more than using special comments as 'modifier', even though doing so would probably have the lowest probability for accidentally ignoring files in old git.

Maybe it's time to choose one of the options with the possibility to validate it for accidental exclusion of files against the top 3.5TB of GitHub repositories to be more sure it?

Previous: Junio C HamanoNext: Phillip Wood
Message 16 of 28 in “[RFC] Define "precious" attribute and support it in `git clean`”
  1. Sebastian ThielOct 10, 2023
  2. Kristoffer HaugsbakkOct 10, 2023
  3. Josh TriplettOct 10, 2023
  4. Junio C HamanoOct 10, 2023
  5. Josh TriplettOct 12, 2023
  6. Kristoffer HaugsbakkOct 10, 2023
  7. Josh TriplettOct 12, 2023
  8. Junio C HamanoOct 10, 2023
  9. Richard KerryOct 11, 2023
  10. Jeff KingOct 11, 2023
  11. Junio C HamanoOct 11, 2023
  12. Sebastian ThielOct 12, 2023
  13. Junio C HamanoOct 12, 2023
  14. Sebastian ThielOct 13, 2023
  15. Junio C HamanoOct 13, 2023
  16. Sebastian ThielOct 14, 2023
  17. Phillip WoodOct 13, 2023
  18. Junio C HamanoOct 14, 2023
  19. Oswald BuddenhagenOct 13, 2023
  20. Josh TriplettOct 14, 2023
  21. Junio C HamanoOct 14, 2023
  22. Elijah NewrenOct 15, 2023
  23. Sebastian ThielOct 15, 2023
  24. Junio C HamanoOct 15, 2023
  25. Sebastian ThielOct 16, 2023
  26. Sebastian ThielOct 23, 2023
  27. Elijah NewrenOct 29, 2023
  28. Kristoffer HaugsbakkOct 11, 2023

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.