Skip to content

Commit 14d4aab

Browse files
committed
Merge branch 'po/doc-assume-unchanged'
Fixes long-standing misunderstanding of what assume-unchanged is about. Some text near what is removed by the bottom patch may also have to be removed. * po/doc-assume-unchanged: gitignore.txt: do not suggest assume-unchanged doc: make clear --assume-unchanged's user contract
2 parents 15a171f + 936d2c9 commit 14d4aab

2 files changed

Lines changed: 8 additions & 14 deletions

File tree

Documentation/git-update-index.txt

Lines changed: 8 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -82,20 +82,18 @@ OPTIONS
8282
Set the execute permissions on the updated files.
8383

8484
--[no-]assume-unchanged::
85-
When these flags are specified, the object names recorded
86-
for the paths are not updated. Instead, these options
87-
set and unset the "assume unchanged" bit for the
88-
paths. When the "assume unchanged" bit is on, Git stops
89-
checking the working tree files for possible
90-
modifications, so you need to manually unset the bit to
91-
tell Git when you change the working tree file. This is
85+
When this flag is specified, the object names recorded
86+
for the paths are not updated. Instead, this option
87+
sets/unsets the "assume unchanged" bit for the
88+
paths. When the "assume unchanged" bit is on, the user
89+
promises not to change the file and allows Git to assume
90+
that the working tree file matches what is recorded in
91+
the index. If you want to change the working tree file,
92+
you need to unset the bit to tell Git. This is
9293
sometimes helpful when working with a big project on a
9394
filesystem that has very slow lstat(2) system call
9495
(e.g. cifs).
9596
+
96-
This option can be also used as a coarse file-level mechanism
97-
to ignore uncommitted changes in tracked files (akin to what
98-
`.gitignore` does for untracked files).
9997
Git will fail (gracefully) in case it needs to modify this file
10098
in the index e.g. when merging in a commit;
10199
thus, in case the assumed-untracked file is changed upstream,

Documentation/gitignore.txt

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -138,9 +138,6 @@ NOTES
138138
The purpose of gitignore files is to ensure that certain files
139139
not tracked by Git remain untracked.
140140

141-
To ignore uncommitted changes in a file that is already tracked,
142-
use 'git update-index {litdd}assume-unchanged'.
143-
144141
To stop tracking a file that is currently tracked, use
145142
'git rm --cached'.
146143

@@ -203,7 +200,6 @@ everything within `foo/bar`):
203200
SEE ALSO
204201
--------
205202
linkgit:git-rm[1],
206-
linkgit:git-update-index[1],
207203
linkgit:gitrepository-layout[5],
208204
linkgit:git-check-ignore[1]
209205

0 commit comments

Comments
 (0)