summaryrefslogtreecommitdiff
path: root/Documentation/git-update-index.txt
diff options
context:
space:
mode:
authorNguyễn Thái Ngọc Duy <pclouds@gmail.com>2009-08-20 20:46:57 +0700
committerJunio C Hamano <gitster@pobox.com>2009-08-23 17:11:28 -0700
commit44a3691362dc71241a5d68d90b07642c46992e4a (patch)
treebaafb787871699fd6e0704004ecd04ab2c3dbe04 /Documentation/git-update-index.txt
parentdbd57f99680eac33626d5058459efd7f118f5170 (diff)
downloadgit-44a3691362dc71241a5d68d90b07642c46992e4a.tar.gz
Introduce "skip-worktree" bit in index, teach Git to get/set this bit
Detail about this bit is in Documentation/git-update-index.txt. Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'Documentation/git-update-index.txt')
-rw-r--r--Documentation/git-update-index.txt29
1 files changed, 29 insertions, 0 deletions
diff --git a/Documentation/git-update-index.txt b/Documentation/git-update-index.txt
index 25e0bbea86..a10f355b7c 100644
--- a/Documentation/git-update-index.txt
+++ b/Documentation/git-update-index.txt
@@ -15,6 +15,7 @@ SYNOPSIS
[--cacheinfo <mode> <object> <file>]\*
[--chmod=(+|-)x]
[--assume-unchanged | --no-assume-unchanged]
+ [--skip-worktree | --no-skip-worktree]
[--ignore-submodules]
[--really-refresh] [--unresolve] [--again | -g]
[--info-only] [--index-info]
@@ -99,6 +100,13 @@ in the index e.g. when merging in a commit;
thus, in case the assumed-untracked file is changed upstream,
you will need to handle the situation manually.
+--skip-worktree::
+--no-skip-worktree::
+ When one of these flags is specified, the object name recorded
+ for the paths are not updated. Instead, these options
+ set and unset the "skip-worktree" bit for the paths. See
+ section "Skip-worktree bit" below for more information.
+
-g::
--again::
Runs 'git-update-index' itself on the paths whose index
@@ -304,6 +312,27 @@ M foo.c
<9> now it checks with lstat(2) and finds it has been changed.
+Skip-worktree bit
+-----------------
+
+Skip-worktree bit can be defined in one (long) sentence: When reading
+an entry, if it is marked as skip-worktree, then Git pretends its
+working directory version is up to date and read the index version
+instead.
+
+To elaborate, "reading" means checking for file existence, reading
+file attributes or file content. The working directory version may be
+present or absent. If present, its content may match against the index
+version or not. Writing is not affected by this bit, content safety
+is still first priority. Note that Git _can_ update working directory
+file, that is marked skip-worktree, if it is safe to do so (i.e.
+working directory version matches index version)
+
+Although this bit looks similar to assume-unchanged bit, its goal is
+different from assume-unchanged bit's. Skip-worktree also takes
+precedence over assume-unchanged bit when both are set.
+
+
Configuration
-------------