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

update-index --really-refresh unsets assume-unchanged bit

From
Clemens Buchacher <drizzd@aon.at>
Date
May 4, 2010, 08:57 UTC
Message-ID
<20100504085722.GA32217@localhost>
In-Reply-To
<20100501092720.GB15941@localhost>
On Sat, May 01, 2010 at 11:27:20AM +0200, Clemens Buchacher wrote:
Show 5 quoted lines
>  --really-refresh::
>  	Like '--refresh', but checks stat information unconditionally,
> -	without regard to the "assume unchanged" setting.
> +	without regard to the "assume unchanged" setting. The "assume
> +	unchanged" bit is unset for all paths.

Scratch that latter part, please. I just noticed the bit is unset only for modified files. If the file matches the index, or even if it has been deleted in the work tree, the bit is _not_ unset.

So the current behavior is quite strange. I see several possible interpretations of --really-refresh:

 Update index for specified paths, disregarding the assume-unchanged bit,
 a) ... and do not ignore work tree changes for tracked files any more.
    I.e., unset the assume-unchanged bit for all files.
 b) ... and do not ignore work tree changes for the specified paths any more.
    I.e., unset assume-unchanged bit only for specified paths.
 c) ... but continue ignoring work tree changes as before.
    I.e., do not unset the assume-unchanged bit for any paths.
(and the current behavior)
 d) ... and do not ignore work tree changes for modified files any more.
    I.e., unset assume-unchanged bit for modified paths.

I believe c) is the most useful, since it allows the user to deactivate the assume-unchanged bit temporarily. All other options potentially change the assume-unchanged bit, which the user may or may not want. In my opinion, it makes no sense to bundle the two operations "update index disregarding the assume-unchanged bit" and "(conditionally) unset assume-unchanged bit."

Clemens
Previous: Clemens BuchacherNext: Avery Pennarun
Message 3 of 7 in “do not overwrite files marked "assume unchanged"”
  1. 1/2 do not overwrite files marked "assume unchanged"Clemens Buchacher, May 1, 2010
  2. 2/2 Documentation: git-add does not update files marked "assume unchanged"Clemens Buchacher, May 1, 2010
  3. update-index --really-refresh unsets assume-unchanged bitClemens Buchacher, May 4, 2010
  4. Avery PennarunMay 4, 2010
  5. Clemens BuchacherMay 4, 2010
  6. Junio C HamanoMay 4, 2010
  7. Clemens BuchacherMay 5, 2010

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.