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

Re: [PATCH] precious-files.txt: new document proposing new precious file type

From
Sebastian Thiel <sebastian.thiel@icloud.com>
Date
Jan 19, 2024, 07:51 UTC
Message-ID
<4421D442-1BB2-4C89-834F-9E70F4CF360B@icloud.com>
In-Reply-To
<CABPp-BF4Bfr3Hfy7atehHvbQds63+GXO9XPJAW3Mb7dvMcCkDg@mail.gmail.com>

Yes, indeed I was a little confused when making the "git commit..." based examples, thanks for correcting them.

Show 5 quoted lines
>
> Reminds me of https://www.emacswiki.org/pics/static/TabsSpacesBoth.png
>
> ;-)
>
😅
Show 14 quoted lines
> Besides, if for a specific file or filetype, accidental additions are
> more important to protect against than accidental nuking, then can't
> folks achieve that by simply using
>
>     # Don't let older git versions add the file
>     .env.secret
>
>     # For newer git versions, override the above; treat it as precious
> (i.e. don't add AND don't accidentally nuke)
>     $.env.secret
>
> In contrast, if protection against accidental nuking is more important
> for certain files, one can use just the second line without the first.
>

I am glad I can pull my initial proposition of 'having both syntaxes' off the table to side with this version - it's gorgeous.

It's easy to forget that the search-order when matching ignore patterns is back to front, which makes this 'trick' work.

If the insights gained with the last couple of emails would see their digest in the user-facing documentation, I think precious files wouldn't only become usable but would also allow projects to make the their choice during the transition period during which some users will inevitably access the repository with a Git that doesn't know about precious files yet.

Previous: Elijah NewrenNext: Junio C Hamano
Message 9 of 15 in “precious-files.txt: new document proposing new precious file type”
  1. precious-files.txt: new document proposing new precious file typeElijah Newren via GitGitGadget, Dec 27, 2023
  2. Junio C HamanoDec 27, 2023
  3. Elijah NewrenDec 27, 2023
  4. Junio C HamanoDec 27, 2023
  5. Sebastian ThielJan 18, 2024
  6. Junio C HamanoJan 18, 2024
  7. Sebastian ThielJan 18, 2024
  8. Elijah NewrenJan 19, 2024
  9. Sebastian ThielJan 19, 2024
  10. Junio C HamanoJan 19, 2024
  11. Elijah NewrenJan 19, 2024
  12. Phillip WoodJan 19, 2024
  13. Junio C HamanoJan 19, 2024
  14. Elijah NewrenJan 24, 2024
  15. Sebastian ThielFeb 11, 2024

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.