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
Elijah Newren <newren@gmail.com>
Date
Oct 29, 2023, 06:44 UTC
Message-ID
<CABPp-BGZHUQz5Bnd1oUptKC_j680Vz0zykEGgXw+89W3Tv6hmw@mail.gmail.com>
In-Reply-To
<918D0772-CDEE-4892-828E-BD8A06C3F1F4@icloud.com>
Hi Sebastian,

On Mon, Oct 23, 2023 at 12:15 AM Sebastian Thiel <sebastian.thiel@icloud.com> wrote:

Show 19 quoted lines
>
> On 16 Oct 2023, at 8:02, Sebastian Thiel wrote:
>
> > I don't know if this time will be different as I can only offer to implement
> > the syntax adjustment, whatever that might be (possibly after validating
> > the candidate against a corpus of repositories), along with the update
> > to `git clean` so it leaves precious files alone by default and a new flag
> > to also remove precious files.
>
> I am happy to announce this feature can now be contributed in full by me once
> you give it a go. This would mean that the entirety of `git` would become
> aware of precious files over time.
>
> To my mind, and probably out of ignorance, it seems that once the syntax is
> decided on it's possible for the implementation to start. From there I could
> use Elijah's analysis to know which parts of git to make aware of precious files
> in addition to `git clean`.
>
> I am definitely looking forward to hearing from you :).

So, we typically don't pre-approve patches/features. Junio described this recently at [1].

However, starting things out with an RFC, as you've done, is certainly a good first step to gauge whether folks think a feature is useful.

Occasionally, when the feature is bigger or touches lots of areas of
the code, people will even write up a design document, and first get a
review on the document, which then streamlines later reviews since we
have some of the high-level aspects agreed to.  Some examples:
  * Documentation/technical/hash-function-transition.txt
  * Documentation/technical/sparse-checkout.txt
  * Documentation/technical/sparse-index.txt
Each of which are in various stages between "these are ideas we think
are good and our plans to get there" to "most of this document has
since been implemented".  There are others in that directory too,
though not everything in that directory is a planning document; some
of the files are simply documentation of what already exists.

Anyway, creating a similar planning document and covering the various cases I mentioned would likely be a very useful next step here. I did note that multiple ideas have been presented in this thread about the syntax for specifying precious files, and it'd be good to nail one down. It would also be nice to see proposed answers to the several cases I brought up (some of which Junio answered, others of which I also have potential answers for so I could potentially help you craft this document, and a few others that someone else would need to fill in). Sometimes we also want to cover pros/cons of the approaches we have decided upon, in part because others may come along later and if they discover a new pro or con that we haven't thought of, then we may need to rethink the plan.

Hope that helps, Elijah

[1] https://lore.kernel.org/git/xmqq8r9ommyt.fsf@gitster.g/
Previous: Sebastian ThielNext: Kristoffer Haugsbakk
Message 27 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.