Путеводитель по Руководству Linux

  User  |  Syst  |  Libr  |  Device  |  Files  |  Other  |  Admin  |  Head  |



   git-update-index    ( 1 )

зарегистрируйте содержимое файла в рабочем дереве в индекс (Register file contents in the working tree to the index)

USING 'ASSUME UNCHANGED' BIT

Many operations in Git depend on your filesystem to have an
       efficient lstat(2) implementation, so that st_mtime information
       for working tree files can be cheaply checked to see if the file
       contents have changed from the version recorded in the index
       file. Unfortunately, some filesystems have inefficient lstat(2).
       If your filesystem is one of them, you can set "assume unchanged"
       bit to paths you have not changed to cause Git not to do this
       check. Note that setting this bit on a path does not mean Git
       will check the contents of the file to see if it has changed — it
       makes Git to omit any checking and assume it has not changed.
       When you make changes to working tree files, you have to
       explicitly tell Git about it by dropping "assume unchanged" bit,
       either before or after you modify them.

In order to set "assume unchanged" bit, use --assume-unchanged option. To unset, use --no-assume-unchanged. To see which files have the "assume unchanged" bit set, use git ls-files -v (see git-ls-files(1)).

The command looks at core.ignorestat configuration variable. When this is true, paths updated with git update-index paths... and paths updated with other Git commands that update both index and working tree (e.g. git apply --index, git checkout-index -u, and git read-tree -u) are automatically marked as "assume unchanged". Note that "assume unchanged" bit is not set if git update-index --refresh finds the working tree file matches the index (use git update-index --really-refresh if you want to mark them as "assume unchanged").