From: "Ævar Arnfjörð Bjarmason" <avarab@gmail.com>
To: Jeff King <peff@peff.net>
Cc: Horst von Brand <vonbrand@inf.utfsm.cl>, git@vger.kernel.org
Subject: Re: No error when overwriting ignored files
Date: Thu, 08 Apr 2021 00:17:50 +0200 [thread overview]
Message-ID: <87a6q9kacx.fsf@evledraar.gmail.com> (raw)
In-Reply-To: <YG4Tl1IPlFBIhV4l@coredump.intra.peff.net>
On Wed, Apr 07 2021, Jeff King wrote:
> On Wed, Apr 07, 2021 at 03:56:38PM -0400, Horst von Brand wrote:
>
>> When pulling from a repository that tracks a file listed in
>> `.gitignore` that would overwrite a local file, this is not reported.
>>
>> For example, in the attached repositories, when doing `git pull tst1`
>> in `tst2`, it is (correctly) reported that `ignored.not` would be
>> overwritten, while `ignored.txt` is not reported.
>
> This is behaving as intended. Ignored files are not considered
> "precious". You can find more discussion by searching for that term in
> the list archive.
>
> There is no concept of "ignored but precious" in Git. However, here's an
> old patch series that tries to move in that direction (using an
> attribute):
>
> https://lore.kernel.org/git/20190216114938.18843-1-pclouds@gmail.com/
>
> AFAIK nobody is actively working on it right now.
Having re-read that thread now I still think by far the most useful way
forward with this for anyone who's interested is to investigate/add
missing tests for our current behavior, why/when it got introduced,
whether anyone wanted it or if it was emergent etc. See [1] for a
summary.
That's quite a bit of work, but is work that someone with little/no
previous familiarity with git's development should be able to do with
enough time & motivation....
1. https://lore.kernel.org/git/87ftsi68ke.fsf@evledraar.gmail.com/
next prev parent reply other threads:[~2021-04-07 22:17 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-04-07 19:56 No error when overwriting ignored files Horst von Brand
2021-04-07 20:18 ` Jeff King
2021-04-07 22:17 ` Ævar Arnfjörð Bjarmason [this message]
2021-04-07 20:47 ` Junio C Hamano
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=87a6q9kacx.fsf@evledraar.gmail.com \
--to=avarab@gmail.com \
--cc=git@vger.kernel.org \
--cc=peff@peff.net \
--cc=vonbrand@inf.utfsm.cl \
/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.