git/list[1] front-page[2] threads[3] people[4] search[5] about
 

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

From
Philip Oakley <philipoakley@iee.org>
Date
Dec 5, 2014, 21:52 UTC
Message-ID
<C082ED21306F4D82BCF6B03D9163836B@PhilipOakley>
In-Reply-To
<xmqqfvctq030.fsf@gitster.dls.corp.google.com>
From: "Junio C Hamano" <gitster@pobox.com>
Show 16 quoted lines
> "Philip Oakley" <philipoakley@iee.org> writes:
>
>> The problem here is that there is no guidance on what those actions 
>> are
>> that may make git 'notice'....
>
> I think the guidance the users need is the one j6t has given already
> in the upthread: "If you are promising Git you are not going to
> touch a path, do not touch it.  Bad things may happen."
>
> There is no need to say "if you touched this way or that way, then
> you might get lucky." because the "lucky" part is not designed.  As
> we find more codepaths that can rely on the promise by the user, we
> may decide to take advantage of that promise even further and the
> "lucky/unlucky" equation _will_ change when that happens.
>

However the man page's statement 'When the "assume unchanged" bit is on, Git stops checking the working tree files for possible modifications, so you need to manually unset the bit to tell Git when you change the working tree file.' can easily be understood the way Sergio has described. Git stops checking so it won't notice any changes, which is a contract it doesn't keep.

Perhaps the man page itself needs rewording to be more firm that the user should NOT change the file. The contract is with the user not to change, rather than a contract by Git not to look.

Even with that man page change, it would not solve many of the user X-Y problems where what they want is an "--ignore-this" flag for a file which does give that alternate contract that 'git won't look until the flag has been cleared.

-- Philip

Previous: Junio C HamanoNext: Andreas Schwab
Message 9 of 19 in “GIT: ignoring changes in tracked files and bug report”
  1. Sérgio BastoDec 4, 2014
  2. bug report on update-index --assume-unchangedSérgio Basto, Dec 5, 2014
  3. Johannes SixtDec 5, 2014
  4. Duy NguyenDec 5, 2014
  5. Sérgio BastoDec 5, 2014
  6. Junio C HamanoDec 5, 2014
  7. Philip OakleyDec 5, 2014
  8. Junio C HamanoDec 5, 2014
  9. Philip OakleyDec 5, 2014
  10. Andreas SchwabDec 5, 2014
  11. Sérgio BastoDec 6, 2014
  12. Philip OakleyDec 6, 2014
  13. Junio C HamanoDec 5, 2014
  14. Sérgio BastoDec 5, 2014
  15. Junio C HamanoDec 5, 2014
  16. Junio C HamanoDec 5, 2014
  17. commit: ignore assume-unchanged files in "commmit <file>" modeNguyễn Thái Ngọc Duy, Dec 5, 2014
  18. Sérgio BastoDec 9, 2014
  19. Philip OakleyDec 11, 2014

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.