Merge branch 'po/doc-assume-unchanged'
authorJunio C Hamano <gitster@pobox.com>
Mon, 22 Dec 2014 20:27:38 +0000 (12:27 -0800)
committerJunio C Hamano <gitster@pobox.com>
Mon, 22 Dec 2014 20:27:38 +0000 (12:27 -0800)
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

1  2 
Documentation/git-update-index.txt
Documentation/gitignore.txt
index 929869b0a0576b8c60a685af2fd6b236e3b4bf1d,da1ccbca8ac1e132c1408a5caa445d7684dc5888..aff01798cdf6b114009eae8dfc4f2866a8a24d17
@@@ -12,7 -12,7 +12,7 @@@ SYNOPSI
  'git update-index'
             [--add] [--remove | --force-remove] [--replace]
             [--refresh] [-q] [--unmerged] [--ignore-missing]
 -           [(--cacheinfo <mode> <object> <file>)...]
 +           [(--cacheinfo <mode>,<object>,<file>)...]
             [--chmod=(+|-)x]
             [--[no-]assume-unchanged]
             [--[no-]skip-worktree]
@@@ -68,12 -68,8 +68,12 @@@ OPTION
  --ignore-missing::
        Ignores missing files during a --refresh
  
 +--cacheinfo <mode>,<object>,<path>::
  --cacheinfo <mode> <object> <path>::
 -      Directly insert the specified info into the index.
 +      Directly insert the specified info into the index.  For
 +      backward compatibility, you can also give these three
 +      arguments as three separate parameters, but new users are
 +      encouraged to use a single-parameter form.
  
  --index-info::
          Read index information from stdin.
          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,
@@@ -161,17 -155,6 +159,17 @@@ may not support it yet
        Only meaningful with `--stdin` or `--index-info`; paths are
        separated with NUL character instead of LF.
  
 +--split-index::
 +--no-split-index::
 +      Enable or disable split index mode. If enabled, the index is
 +      split into two files, $GIT_DIR/index and $GIT_DIR/sharedindex.<SHA-1>.
 +      Changes are accumulated in $GIT_DIR/index while the shared
 +      index file contains all index entries stays unchanged. If
 +      split-index mode is already enabled and `--split-index` is
 +      given again, all changes in $GIT_DIR/index are pushed back to
 +      the shared index file. This mode is designed for very large
 +      indexes that take a significant amount of time to read or write.
 +
  \--::
        Do not interpret any more arguments as options.
  
@@@ -202,7 -185,7 +200,7 @@@ merging
  To pretend you have a file with mode and sha1 at path, say:
  
  ----------------
 -$ git update-index --cacheinfo mode sha1 path
 +$ git update-index --cacheinfo <mode>,<sha1>,<path>
  ----------------
  
  '--info-only' is used to register files without placing them in the object
index 09e82c31bd320a162689a7f2d919de439d05375a,04d50606c2eda7ce05c1b8720ebb8a11c0e316bc..4fd04423e9342e05d34b4a72a4e1af802b8c10c8
@@@ -77,9 -77,6 +77,9 @@@ PATTERN FORMA
     Put a backslash ("`\`") in front of the first hash for patterns
     that begin with a hash.
  
 + - Trailing spaces are ignored unless they are quoted with backslash
 +   ("`\`").
 +
   - An optional prefix "`!`" which negates the pattern; any
     matching file excluded by a previous pattern will become
     included again. It is not possible to re-include a file if a parent
@@@ -138,9 -135,6 +138,6 @@@ NOTE
  The purpose of gitignore files is to ensure that certain files
  not tracked by Git remain untracked.
  
- To ignore uncommitted changes in a file that is already tracked,
- use 'git update-index {litdd}assume-unchanged'.
  To stop tracking a file that is currently tracked, use
  'git rm --cached'.
  
@@@ -203,7 -197,6 +200,6 @@@ everything within `foo/bar`)
  SEE ALSO
  --------
  linkgit:git-rm[1],
- linkgit:git-update-index[1],
  linkgit:gitrepository-layout[5],
  linkgit:git-check-ignore[1]