From: Sebastian Thiel <sebastian.thiel@icloud.com>
To: Junio C Hamano <gitster@pobox.com>
Cc: Elijah Newren <newren@gmail.com>,
Josh Triplett <josh@joshtriplett.org>,
git@vger.kernel.org
Subject: Re: [RFC] Define "precious" attribute and support it in `git clean`
Date: Mon, 16 Oct 2023 08:02:25 +0200 [thread overview]
Message-ID: <1EE716BB-C8D5-4543-A5BE-EB8518151077@icloud.com> (raw)
In-Reply-To: <xmqqmswjsv8c.fsf@gitster.g>
Thanks a lot, that makes perfect sense!
Thanks to Elijah we may also have discovered why the idea of precious files
didn't get implemented last time it came up: it's too much work to make
all portions of the code aware.
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.
Maybe that already is something worth having, but I can also imagine
that ideally there is a plan for retrofitting other portions of git as
well along with the resources to actually do it.
On 15 Oct 2023, at 18:31, Junio C Hamano wrote:
> Sebastian Thiel <sebastian.thiel@icloud.com> 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.
next prev parent reply other threads:[~2023-10-16 6:11 UTC|newest]
Thread overview: 28+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-10-10 12:37 [RFC] Define "precious" attribute and support it in `git clean` Sebastian Thiel
2023-10-10 13:38 ` Kristoffer Haugsbakk
2023-10-10 14:10 ` Josh Triplett
2023-10-10 17:07 ` Junio C Hamano
2023-10-12 8:47 ` Josh Triplett
2023-10-10 19:10 ` Kristoffer Haugsbakk
2023-10-12 9:04 ` Josh Triplett
2023-10-10 17:02 ` Junio C Hamano
2023-10-11 10:06 ` Richard Kerry
2023-10-11 22:40 ` Jeff King
2023-10-11 23:35 ` Junio C Hamano
2023-10-12 10:55 ` Sebastian Thiel
2023-10-12 16:58 ` Junio C Hamano
2023-10-13 9:09 ` Sebastian Thiel
2023-10-13 16:39 ` Junio C Hamano
2023-10-14 7:30 ` Sebastian Thiel
2023-10-13 10:06 ` Phillip Wood
2023-10-14 16:10 ` Junio C Hamano
2023-10-13 11:25 ` Oswald Buddenhagen
2023-10-14 5:59 ` Josh Triplett
2023-10-14 17:41 ` Junio C Hamano
2023-10-15 6:44 ` Elijah Newren
2023-10-15 7:33 ` Sebastian Thiel
2023-10-15 16:31 ` Junio C Hamano
2023-10-16 6:02 ` Sebastian Thiel [this message]
2023-10-23 7:15 ` Sebastian Thiel
2023-10-29 6:44 ` Elijah Newren
2023-10-11 21:41 ` Kristoffer Haugsbakk
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1EE716BB-C8D5-4543-A5BE-EB8518151077@icloud.com \
--to=sebastian.thiel@icloud.com \
--cc=git@vger.kernel.org \
--cc=gitster@pobox.com \
--cc=josh@joshtriplett.org \
--cc=newren@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).