git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
From: Junio C Hamano <gitster@pobox.com>
To: Kevin Daudt <me@ikke.info>
Cc: Timur Tabi <timur@codeaurora.org>, git <git@vger.kernel.org>
Subject: Re: .gitignore does not ignore Makefile
Date: Thu, 22 Sep 2016 11:26:58 -0700	[thread overview]
Message-ID: <xmqqy42j4wp9.fsf@gitster.mtv.corp.google.com> (raw)
In-Reply-To: <20160922154421.GA6641@ikke.info> (Kevin Daudt's message of "Thu, 22 Sep 2016 17:44:21 +0200")

Kevin Daudt <me@ikke.info> writes:

> Often people advise tricks like `git update-index --assume-unchanges
> <file>`, but this does not work as expected. It's merely a promise to
> git that this file does not change (and hence, git will not check if
> this file has changed when doing git status), but command that try to
> change this file will abort saying that the file has changed.

It actually is even worse.  As the user promised Git that the <file>
will not be modified and will be kept the same as the version in the
index, Git reserves the right to _overwrite_ it with the version in
the index anytime when it is convenient to do so, removing whatever
local change the user had despite the promise to Git.  The "abort
saying that the file has changed" is merely various codepaths in the
current implementation trying to be extra nice.




  reply	other threads:[~2016-09-22 18:27 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-09-22 14:19 .gitignore does not ignore Makefile Timur Tabi
2016-09-22 15:44 ` Kevin Daudt
2016-09-22 18:26   ` Junio C Hamano [this message]
2016-09-22 18:44     ` Timur Tabi
2016-09-22 19:16       ` Junio C Hamano
2016-09-23 22:29     ` Jakub Narębski

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=xmqqy42j4wp9.fsf@gitster.mtv.corp.google.com \
    --to=gitster@pobox.com \
    --cc=git@vger.kernel.org \
    --cc=me@ikke.info \
    --cc=timur@codeaurora.org \
    /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).