summaryrefslogtreecommitdiff
path: root/Documentation
diff options
context:
space:
mode:
authorLibravatar Philip Oakley <philipoakley@iee.org>2014-12-06 15:04:30 +0000
committerLibravatar Junio C Hamano <gitster@pobox.com>2014-12-09 14:23:29 -0800
commitccadb25f730de775660c82695c5fcf9169f0aae7 (patch)
treeaf704299ad5ee6f5cbe654cbbd2bfa8231ad656a /Documentation
parentMerge branch 'maint-1.8.5' into maint-1.9 (diff)
downloadtgif-ccadb25f730de775660c82695c5fcf9169f0aae7.tar.xz
doc: make clear --assume-unchanged's user contract
Many users misunderstand the --assume-unchanged contract, believing it means Git won't look at the flagged file. Be explicit that the --assume-unchanged contract is by the user that they will NOT change the file so that Git does not need to look (and expend, for example, lstat(2) cycles) Mentioning "Git stops checking" does not help the reader, as it is only one possible consequence of what that assumption allows Git to do, but (1) there are things other than "stop checking" that Git can do based on that assumption; and (2) Git is not obliged to stop checking; it merely is allowed to. Also, this is a single flag bit, correct the plural to singular, and the verb, accordingly. Drop the stale and incorrect information about "poor-man's ignore", which is not what this flag bit is about at all. Signed-off-by: Philip Oakley <philipoakley@iee.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'Documentation')
-rw-r--r--Documentation/git-update-index.txt18
1 files changed, 8 insertions, 10 deletions
diff --git a/Documentation/git-update-index.txt b/Documentation/git-update-index.txt
index e0a87029cd..da1ccbca8a 100644
--- a/Documentation/git-update-index.txt
+++ b/Documentation/git-update-index.txt
@@ -78,20 +78,18 @@ OPTIONS
Set the execute permissions on the updated files.
--[no-]assume-unchanged::
- When these flags are specified, the object names recorded
- for the paths are not updated. Instead, these options
- set and unset the "assume unchanged" bit for the
- paths. 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. This is
+ When this flag is specified, the object names recorded
+ for the paths are not updated. Instead, this option
+ sets/unsets the "assume unchanged" bit for the
+ paths. When the "assume unchanged" bit is on, the user
+ promises not to change the file and allows Git to assume
+ that the working tree file matches what is recorded in
+ the index. If you want to change the working tree file,
+ you need to unset the bit to tell Git. This is
sometimes helpful when working with a big project on a
filesystem that has very slow lstat(2) system call
(e.g. cifs).
+
-This option can be also used as a coarse file-level mechanism
-to ignore uncommitted changes in tracked files (akin to what
-`.gitignore` does for untracked files).
Git will fail (gracefully) in case it needs to modify this file
in the index e.g. when merging in a commit;
thus, in case the assumed-untracked file is changed upstream,