From: "Philip Oakley" <philipoakley@iee.org>
To: "Junio C Hamano" <gitster@pobox.com>, "Sérgio Basto" <sergio@serjux.com>
Cc: "Duy Nguyen" <pclouds@gmail.com>, "Johannes Sixt" <j6t@kdbg.org>,
"Git Mailing List" <git@vger.kernel.org>
Subject: Re: bug report on update-index --assume-unchanged
Date: Fri, 5 Dec 2014 20:48:17 -0000 [thread overview]
Message-ID: <12536C063959480083CC2D4CBA0BA38E@PhilipOakley> (raw)
In-Reply-To: xmqq1toeq79b.fsf@gitster.dls.corp.google.com
From: "Junio C Hamano" <gitster@pobox.com>
> Sérgio Basto <sergio@serjux.com> writes:
>
>
>> On Sex, 2014-12-05 at 17:52 +0700, Duy Nguyen wrote:
>>> On Fri, Dec 5, 2014 at 1:55 PM, Johannes Sixt <j6t@kdbg.org> wrote:
>>> > 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.
>>> > ;-)
>>
>>
>> No, I marked with assume-unchanged *after* change the file , and not
>> before. Else don't see what is the point of assume-unchanged if you
>> really don't change the file.
>
> That "unchanged" is relative to what is in the index.
>
> Your promise is "these paths I will not modify" and in return you
> gain performance in "git status" as the promise allows Git not to
> check with lstat() if the files in the workng tree was modified and
> instead assume that you didn't change them. That is the point of
> assume-unchanged bit.
>
> If however you did something that made Git notice that you changed
> these paths marked with assume-unchanged bit anyway, then Git will,
> well, notice that they are not "unchanged" as you promised.
The problem here is that there is no guidance on what those actions are
that may make git 'notice'. The man page git-update-index isn't as clear
as it could be. Using --really-refresh being one option that would make
git notice, but I wouldn't know when that is used.
Part of the implied question is why "git commit ." would notice when
when "git commit -a" didn't appear to. So it's unclear as to what the
user should have expected.
(Note, I don't use assume-unchanged myself so this is more about
supporting the user/manual clarification. It is mentioned moderately
often on stackoverflow etc.)
--
Philip
next prev parent reply other threads:[~2014-12-05 20:47 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-12-04 22:42 GIT: ignoring changes in tracked files and bug report Sérgio Basto
2014-12-05 6:12 ` bug report on update-index --assume-unchanged Sérgio Basto
2014-12-05 6:55 ` Johannes Sixt
2014-12-05 10:52 ` Duy Nguyen
2014-12-05 16:57 ` Sérgio Basto
2014-12-05 18:30 ` Junio C Hamano
2014-12-05 20:48 ` Philip Oakley [this message]
2014-12-05 21:05 ` Junio C Hamano
2014-12-05 21:55 ` Philip Oakley
2014-12-05 22:18 ` Andreas Schwab
2014-12-06 0:45 ` Sérgio Basto
2014-12-06 13:28 ` Philip Oakley
2014-12-05 21:19 ` Junio C Hamano
2014-12-05 21:39 ` Sérgio Basto
2014-12-05 21:52 ` Junio C Hamano
2014-12-05 18:33 ` Junio C Hamano
2014-12-05 10:56 ` [PATCH] commit: ignore assume-unchanged files in "commmit <file>" mode Nguyễn Thái Ngọc Duy
2014-12-09 2:44 ` Sérgio Basto
2014-12-11 23:23 ` Philip Oakley
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=12536C063959480083CC2D4CBA0BA38E@PhilipOakley \
--to=philipoakley@iee.org \
--cc=git@vger.kernel.org \
--cc=gitster@pobox.com \
--cc=j6t@kdbg.org \
--cc=pclouds@gmail.com \
--cc=sergio@serjux.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