Re: [RFC] Define "precious" attribute and support it in `git clean`
- From
Junio C Hamano <gitster@pobox.com>
- Date
- Oct 11, 2023, 23:35 UTC
- Message-ID
- <xmqqmswoivg9.fsf@gitster.g>
- In-Reply-To
- <AS8PR02MB73027943EE0A30DD8DAAD4639CCCA@AS8PR02MB7302.eurprd02.prod.outlook.com>
Richard Kerry <richard.kerry@eviden.com> writes:
> An option might be to state, in config, whether a project, or > everything, should be managed on the basis of "all untracked files > are precious" or "files may be explicitly marked precious", or, as > now, "nothing is precious".
I do not think there is any need to have a separate "all or none" option. We do not have to make things more complicated than necessary.
If all untracked files are precious, a user should be able to say so with an entry that matches all paths "*" to mark them precious, and nothing more needs to be done. By default nothing is ignored and nothing is precious, until you start marking paths with .gitignore entries.