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 18, 2024, 07:51 UTC
Message-ID
<298F7067-D572-433F-A7DD-5256B43B97D7@icloud.com>
In-Reply-To
<xmqqsf3nl2b3.fsf@gitster.g>

I thought it would be helpful to see the syntax being referred to here, as first brought up by Phillip Wood:

#(keep) /my-precious-file

The main benefit I see for it is that it's extensible, despite having trouble imagining what such extension would be 10 years from now. On the flip side, since it's already using a comment, people will be even more inclined to document the reason for the preciousness of the file.

# The kernel configuration, typically created by running a TUI program #(keep) .config

As a side-effect of the syntax, it's obvious this is an 'upgrade', with perfect backwards compatibility as old git does the same as always.

I'd love to take first steps into the implementation, and if the above should be the syntax to use, I'd be happy to submit a patch for parsing it, along with initial support for precious files in `git clean` and `git status`.

Does that sound like a reasonable next step?
On 27 Dec 2023, at 23:15, Junio C Hamano wrote:
Show 18 quoted lines
> Elijah Newren <newren@gmail.com> writes:
>
>> There are
>> precisely two choices in our design for how older Git versions can
>> treat precious files:
>>   * ignored-and-expendable
>>   * untracked-and-precious
>> If we pick syntax that causes older Git versions to treat precious
>> files as ignored-and-expendable, we risk deleting important files.
>
> Yes but not really.  I'd expect the adoption of precious feature and
> the adoption of versions of Git that supports that feature will go
> more or less hand in hand.  Projects that, for any reason, need to
> keep their participants at pre-precious versions of Git would
> naturally refrain from marking the "precious" paths in their "ignore"
> mechanism before their participants are ready, so even if we chose
> syntax that will make the precious ones mistaken as merely ignored,
> the damage would be fairly small.
Previous: Junio C HamanoNext: Junio C Hamano
Message 5 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.