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

From: Junio C Hamano <[email-masked]>
Date: Sun, 15 Oct 2023 09:31:31 -0700

Sebastian Thiel <[email-masked]> writes:

> A particularly interesting question brought up here also was the question
> of what's more important: untracked files, or precious files? Are they
> effectively treated the same, or is there a difference?

Think of it this way.  There are two orthogonal axes.

 (1) Are you a candidate to be tracked, even though you are not
     tracked right now?

 (2) Should you be kept and make an operation fail that wants to
     remove you to make room?

For untracked files, both are "Yes".  As we already saw in the long
discussion, precious files are "not to be added and not to be
clobbered", so you'd answer "No" and "Yes" [*].

In other words, both are equally protected from getting cloberred.

    Side note: for completeness, for ignored files, the answers are
    "No", and "No".  The introduction of "precious" class makes a
    combination "No-Yes" that hasn't been possible so far.

Elijah, thanks for doing a very good job of creating a catalog of
kludges we accumulated over the years for the lack of proper support
for the precious paths.  I think they should be kept for backward
compatibility, but for new users they should not have to learn any
of them once we have the support for precious paths.