git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Kevin D <me@ikke.info>
To: Arup Rakshit <aruprakshit@rocketmail.com>
Cc: t.gummerer@gmail.com, git@vger.kernel.org
Subject: Re: fatal: Unable to mark file .ruby-version
Date: Sun, 15 Mar 2015 18:45:43 +0100	[thread overview]
Message-ID: <20150315174543.GA11832@vps892.directvps.nl> (raw)
In-Reply-To: <20150315165819.GA17591@hank>

On Sun, Mar 15, 2015 at 05:58:19PM +0100, t.gummerer@gmail.com wrote:
> On 03/15, Arup Rakshit wrote:
> > On Sunday, March 15, 2015 01:30:04 PM you wrote:
> > > 
> > > With --assume-unchanged you're promising git that you will not change
> > > a file that is already in the repository.  Git doesn't check those
> > > files for changes anymore, which can improve performance.
> > > 
> > 
> > I didn't understand your point. Could you please elaborate more on it ?
> 
> --assume-unchanged only works on files that you added on the
> repository, not on untracked files.  Because you don't seem to want
> these files in the repository, update-index --assume-unchanged will
> not work for you.
> 

And to elaborate what on what t.gummerer meant earlier: git update-index
--assume-unchanged is often abused to ignore already tracked files,
thinking that they can change the file while git happily ignores it.

--assume-unchanged was neaver built for this purpose, it's built for
large code bases where parts of the code base never changes, and git
checking this part would only slow it down. So that's why it's called a
promise to git that the file never changes, because git doesn't check
the status of the file everytime you run git status.

But because the file is still tracked, any commit that changes the file
causes git to still update that file, but git will then protest, because
it found it the file actually changed in the mean time, and you broke
that promise.

But also already said, this only applies to tracked files, so not to files
that aren't being tracked in the first place.

Kevin

  reply	other threads:[~2015-03-15 17:45 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-03-15 10:01 fatal: Unable to mark file .ruby-version Arup Rakshit
2015-03-15 12:30 ` t.gummerer
2015-03-15 14:21   ` Arup Rakshit
2015-03-15 16:58     ` t.gummerer
2015-03-15 17:45       ` Kevin D [this message]
2015-03-16  5:29         ` Arup Rakshit

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=20150315174543.GA11832@vps892.directvps.nl \
    --to=me@ikke.info \
    --cc=aruprakshit@rocketmail.com \
    --cc=git@vger.kernel.org \
    --cc=t.gummerer@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 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 NNTP newsgroup(s).