git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
From: Jeff King <peff@peff.net>
To: Horst von Brand <vonbrand@inf.utfsm.cl>
Cc: git@vger.kernel.org
Subject: Re: No error when overwriting ignored files
Date: Wed, 7 Apr 2021 16:18:31 -0400	[thread overview]
Message-ID: <YG4Tl1IPlFBIhV4l@coredump.intra.peff.net> (raw)
In-Reply-To: <2056254759.360640.1617825398727.JavaMail.zimbra@inf.utfsm.cl>

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.

-Peff

  reply	other threads:[~2021-04-07 20:18 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 [this message]
2021-04-07 22:17   ` Ævar Arnfjörð Bjarmason
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

  List information: http://vger.kernel.org/majordomo-info.html

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=YG4Tl1IPlFBIhV4l@coredump.intra.peff.net \
    --to=peff@peff.net \
    --cc=git@vger.kernel.org \
    --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.
Code repositories for project(s) associated with this public inbox

	https://80x24.org/mirrors/git.git

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 read-only IMAP folder(s) and NNTP newsgroup(s).