X-Git-Url: https://git.verplant.org/?a=blobdiff_plain;f=Documentation%2Fgit-update-cache.txt;h=7340e89c1fe2d0f93d7ed7499e9d1536f05620ad;hb=12dd6e8cb0643231628d0240fdbb4afdef6629ea;hp=947f2bded0317bab04598d2fb9755db0995c6c45;hpb=b43d44779bf98977b211256f936d0edda8a9625a;p=git.git diff --git a/Documentation/git-update-cache.txt b/Documentation/git-update-cache.txt index 947f2bde..7340e89c 100644 --- a/Documentation/git-update-cache.txt +++ b/Documentation/git-update-cache.txt @@ -14,6 +14,7 @@ SYNOPSIS [--ignore-missing] [--force-remove] [--cacheinfo ]\* + [--info-only] [--] []\* DESCRIPTION @@ -47,6 +48,11 @@ OPTIONS --cacheinfo :: Directly insert the specified info into the cache. +--info-only:: + Do not create objects in the object database for all + arguments that follow this flag; just insert + their object IDs into the cache. + --force-remove:: 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 +merging. + + 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. + +Examples +-------- To update and refresh only the files already checked out: git-checkout-cache -n -f -a && git-update-cache --ignore-missing --refresh