path: root/Documentation
diff options
authorBryan Larsen <>2005-07-08 23:52:12 (GMT)
committerLinus Torvalds <>2005-07-09 00:07:37 (GMT)
commitdf6e151636992edc5824af53b62b451737b0d24d (patch)
tree24523944fbaabeeb963e7ca411ba122f3196a3af /Documentation
parent7672db20c2060f20b01788e4a4289ebc5f818605 (diff)
[PATCH] Add --info-only option to git-update-cache.
Add --info-only option to git-update-cache. [JC demangled whitespace from the posted patch himself because he liked it so much. Also adjusted to the index_fd() interface slightly done differently from the original one.] Signed-off-by: Bryan Larsen <> Signed-off-by: Junio C Hamano <> Signed-off-by: Linus Torvalds <>
Diffstat (limited to 'Documentation')
1 files changed, 24 insertions, 6 deletions
diff --git a/Documentation/git-update-cache.txt b/Documentation/git-update-cache.txt
index 947f2bd..7340e89 100644
--- a/Documentation/git-update-cache.txt
+++ b/Documentation/git-update-cache.txt
@@ -14,6 +14,7 @@ SYNOPSIS
[--cacheinfo <mode> <object> <file>]\*
+ [--info-only]
[--] [<file>]\*
@@ -47,6 +48,11 @@ OPTIONS
--cacheinfo <mode> <object> <path>::
Directly insert the specified info into the cache.
+ Do not create objects in the object database for all
+ <file> arguments that follow this flag; just insert
+ their object IDs into the cache.
Remove the file from the index even when the working directory
still has such a file. (Implies --remove.)
@@ -80,15 +86,27 @@ the stat entry is out of date.
For example, you'd want to do this after doing a "git-read-tree", to link
up the stat cache details with the proper files.
-Using --cacheinfo
-'--cacheinfo' is used to register a file that is not in the current
-working directory. This is useful for minimum-checkout merging.
+Using --cacheinfo or --info-only
+'--cacheinfo' is used to register a file that is not in the
+current working directory. This is useful for minimum-checkout
+ To pretend you have a file with mode and sha1 at path, say:
-To pretend you have a file with mode and sha1 at path, say:
+ $ git-update-cache --cacheinfo mode sha1 path
- $ git-update-cache --cacheinfo mode sha1 path
+'--info-only' is used to register files without placing them in the object
+database. This is useful for status-only repositories.
+Both '--cacheinfo' and '--info-only' behave similarly: the index is updated
+but the object database isn't. '--cacheinfo' is useful when the object is
+in the database but the file isn't available locally. '--info-only' is
+useful when the file is available, but you do not wish to update the
+object database.
To update and refresh only the files already checked out:
git-checkout-cache -n -f -a && git-update-cache --ignore-missing --refresh