From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on dcvr.yhbt.net X-Spam-Level: X-Spam-ASN: AS53758 23.128.96.0/24 X-Spam-Status: No, score=-3.9 required=3.0 tests=AWL,BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI, SPF_HELO_PASS,SPF_PASS shortcircuit=no autolearn=ham autolearn_force=no version=3.4.2 Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by dcvr.yhbt.net (Postfix) with ESMTP id 0501B1F4B4 for ; Wed, 7 Apr 2021 20:18:39 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234971AbhDGUSq (ORCPT ); Wed, 7 Apr 2021 16:18:46 -0400 Received: from cloud.peff.net ([104.130.231.41]:43694 "EHLO cloud.peff.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1356052AbhDGUSm (ORCPT ); Wed, 7 Apr 2021 16:18:42 -0400 Received: (qmail 17688 invoked by uid 109); 7 Apr 2021 20:18:32 -0000 Received: from Unknown (HELO peff.net) (10.0.1.2) by cloud.peff.net (qpsmtpd/0.94) with ESMTP; Wed, 07 Apr 2021 20:18:32 +0000 Authentication-Results: cloud.peff.net; auth=none Received: (qmail 22645 invoked by uid 111); 7 Apr 2021 20:18:32 -0000 Received: from coredump.intra.peff.net (HELO sigill.intra.peff.net) (10.0.0.2) by peff.net (qpsmtpd/0.94) with (TLS_AES_256_GCM_SHA384 encrypted) ESMTPS; Wed, 07 Apr 2021 16:18:32 -0400 Authentication-Results: peff.net; auth=none Date: Wed, 7 Apr 2021 16:18:31 -0400 From: Jeff King To: Horst von Brand Cc: git@vger.kernel.org Subject: Re: No error when overwriting ignored files Message-ID: References: <2056254759.360640.1617825398727.JavaMail.zimbra@inf.utfsm.cl> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <2056254759.360640.1617825398727.JavaMail.zimbra@inf.utfsm.cl> Precedence: bulk List-ID: X-Mailing-List: git@vger.kernel.org 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