X-Git-Url: https://git.octo.it/?a=blobdiff_plain;f=Documentation%2Fgit-update-index.txt;h=e01b42f4457ecff994e2f7c96573ff0e70024f76;hb=c82a22c39cbc32576f64f5c6b3f24b99ea8149c7;hp=0a1b0ad56de61bba8f5dd19df79e2e73c4f759b7;hpb=b3466cd8e2a63af8a9a8a609f1418a9f2c6f67e6;p=git.git diff --git a/Documentation/git-update-index.txt b/Documentation/git-update-index.txt index 0a1b0ad5..e01b42f4 100644 --- a/Documentation/git-update-index.txt +++ b/Documentation/git-update-index.txt @@ -10,8 +10,8 @@ SYNOPSIS -------- [verse] 'git-update-index' - [--add] [--remove | --force-remove] [--replace] - [--refresh [-q] [--unmerged] [--ignore-missing]] + [--add] [--remove | --force-remove] [--replace] + [--refresh] [-q] [--unmerged] [--ignore-missing] [--cacheinfo ]\* [--chmod=(+|-)x] [--assume-unchanged | --no-assume-unchanged] @@ -247,34 +247,33 @@ To update and refresh only the files already checked out: $ git-checkout-index -n -f -a && git-update-index --ignore-missing --refresh ---------------- -On an inefficient filesystem with `core.ignorestat` set: - +On an inefficient filesystem with `core.ignorestat` set:: ++ ------------ -$ git update-index --really-refresh <1> -$ git update-index --no-assume-unchanged foo.c <2> -$ git diff --name-only <3> +$ git update-index --really-refresh <1> +$ git update-index --no-assume-unchanged foo.c <2> +$ git diff --name-only <3> $ edit foo.c -$ git diff --name-only <4> +$ git diff --name-only <4> M foo.c -$ git update-index foo.c <5> -$ git diff --name-only <6> +$ git update-index foo.c <5> +$ git diff --name-only <6> $ edit foo.c -$ git diff --name-only <7> -$ git update-index --no-assume-unchanged foo.c <8> -$ git diff --name-only <9> +$ git diff --name-only <7> +$ git update-index --no-assume-unchanged foo.c <8> +$ git diff --name-only <9> M foo.c - -<1> forces lstat(2) to set "assume unchanged" bits for paths - that match index. +------------ ++ +<1> forces lstat(2) to set "assume unchanged" bits for paths that match index. <2> mark the path to be edited. <3> this does lstat(2) and finds index matches the path. -<4> this does lstat(2) and finds index does not match the path. +<4> this does lstat(2) and finds index does *not* match the path. <5> registering the new version to index sets "assume unchanged" bit. <6> and it is assumed unchanged. <7> even after you edit it. <8> you can tell about the change after the fact. <9> now it checks with lstat(2) and finds it has been changed. ------------- Configuration