Subject: Re: bug report on update-index --assume-unchanged

From: Johannes Sixt <[email-masked]>
Date: Fri, 05 Dec 2014 07:55:33 +0100

Am 05.12.2014 07:12, schrieb Sérgio Basto:
> Hi,
>
> I add 2 files that I want ignore on commits
> git update-index --assume-unchanged configurations/local.defs
> git update-index --assume-unchanged processor/default.defs
>
> git diff -a
> is clean
> git diff .
> is clean
> git commit -a
>
> nothing added to commit
>
> but
>
> git commit .
> # Changes to be committed:
> #       modified:   configurations/local.defs
> #       modified:   processor/default.defs
>
> this is a bug .

Actually, it's a user error. When you set --assume-unchanged, then you 
give a promise to git that you do not change the files, and git does not 
have to check itself whether there is a change.

But since you did not keep your promise, you get what you deserve. ;-)

So, to follow-up on your nearby post: --assume-unchanged is *not* a tool 
to avoid accidentally committing changes to files that are tracked.

-- Hannes