All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Ævar Arnfjörð Bjarmason" <avarab@gmail.com>
To: Junio C Hamano <gitster@pobox.com>
Cc: Duy Nguyen <pclouds@gmail.com>, Git Mailing List <git@vger.kernel.org>
Subject: Re: What's cooking in git.git (Apr 2019, #01; Thu, 4)
Date: Sat, 06 Apr 2019 22:28:48 +0200	[thread overview]
Message-ID: <87d0lyanen.fsf@evledraar.gmail.com> (raw)
In-Reply-To: <xmqqmul5e9y0.fsf@gitster-ct.c.googlers.com>


On Thu, Apr 04 2019, Junio C Hamano wrote:

> Duy Nguyen <pclouds@gmail.com> writes:
>
>> On Thu, Apr 4, 2019 at 5:29 PM Junio C Hamano <gitster@pobox.com> wrote:
>>> * nd/precious (2019-04-01) 1 commit
>>>  - Introduce "precious" file concept
>>>
>>>  "git clean" learned to pay attention to the 'precious' attributes
>>>  and keep untracked paths with the attribute instead of removing.
>>>
>>>  Will merge to 'next'.
>>
>> There was no conclusion from the last thread if I remember correctly
>> and I kind of gave up on it. If you want to include anyway, should we
>> go for a more specific attribute (e.g. "clean") and leave "precious"
>> for later whenever it's better defined?
>
> I'd rather pick between (1) using the final name for the concept we
> want to eventually achieve, i.e. "precious", and starting small,
> i.e. "initially, only git-clean knows about it", or (2) doing
> nothing.  Per-command 'precious-this', 'precious-that' that would be
> left as interface wart for years is not a pretty sight I want to
> see.

I think we shouldn't squat "precious" in general without seeing where we
want to go with it, which I tried to sum up in
https://public-inbox.org/git/87ftsi68ke.fsf@evledraar.gmail.com/

But aside from that larger discussion, I see no problem with having some
"+clean" or "-clean" attribute with basically Duy's current patch in
nd/precious with the equivalent of "s/precious/clean/". Duy suggested
this in
https://public-inbox.org/git/CACsJy8C377NmLv9edNYjinKAQf-P1y5+Nwhdj3vRkz_E__x43Q@mail.gmail.com/

I see the desire to keep some untracked stuff you know about as
different from what amounts to a workaround for merge/checkout
inadvertently stomping on your checkout and shredding your data, without
(as noted in my upthread summary) us having the full picture of whether
that's even needed as a permanent configurable workaround, or we could
"just" fix that "bug".

But on the subject on the implementation of nd/precious (assuming
s/precious/clean/) I'm concerned that this "I want to keep *.o on
'git-clean'" use-case leaves us with no way to do what you can now do
with:

    git clean -dxff

Now the git-clean documentation promises:

    "Cleans [...] files that are not under version control"

And, for -x:

    "Don’t use the [repository's] ignore rules[...]This allows removing
    all untracked files, including build products"

Except now we have a feature that's ostensibly exactly for this "build
products" use-case, but doesn't yield to the -x option, which we've
documented as being the escape hatch for exactly that sort of thing.

In my mind "clean" has two fundamentally different use-cases. a) I made
this repo and trust its .gitignore file b) I didn't make it/don't trust
it and/or I just want to be guaranteed to get the exact same checkout a
"git clone" would give me.

Now you can do "git clean -dxff" (and if submodules init && ...) for
"b", but the "precious" patch in the current form completely breaks "b"
to satisfy a use-case of "a".

I think we should at the very least have a "-xx" like "-ff" now as an
escape hatch, but more conservatively shouldn't be breaking the
reasonable assumption a user of "-x" could make so far, which is "ignore
repo config, just wipe it all".

  reply	other threads:[~2019-04-06 20:28 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-04-04 10:28 What's cooking in git.git (Apr 2019, #01; Thu, 4) Junio C Hamano
2019-04-04 11:08 ` Duy Nguyen
2019-04-04 21:29   ` Junio C Hamano
2019-04-06 20:28     ` Ævar Arnfjörð Bjarmason [this message]
2019-04-08  4:14       ` Junio C Hamano
2019-04-09 10:26         ` [PATCH] Introduce "precious" file concept Nguyễn Thái Ngọc Duy
2019-04-09 11:31           ` Junio C Hamano
2019-04-10  9:36             ` Duy Nguyen
2019-04-12  1:28               ` Junio C Hamano
2019-04-09 17:44           ` Eric Sunshine
2019-04-12 21:54           ` Ævar Arnfjörð Bjarmason
2019-04-13 10:19             ` Duy Nguyen
2019-04-05  1:05 ` What's cooking in git.git (Apr 2019, #01; Thu, 4) Todd Zullinger
2019-04-05  5:41   ` Junio C Hamano
2019-04-06 19:28 ` Ævar Arnfjörð Bjarmason
2019-04-08  4:18   ` Junio C Hamano
2019-04-06 19:57 ` Ævar Arnfjörð Bjarmason
2019-04-08  4:28   ` Junio C Hamano
2019-04-08 21:18     ` Josh Steadmon

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=87d0lyanen.fsf@evledraar.gmail.com \
    --to=avarab@gmail.com \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    --cc=pclouds@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.