aboutsummaryrefslogtreecommitdiffstats
path: root/Documentation/git-update-index.txt
diff options
context:
space:
mode:
authorElijah Newren <newren@gmail.com>2018-08-08 13:28:07 -0700
committerJunio C Hamano <gitster@pobox.com>2018-08-08 14:53:16 -0700
commit388d0ff6e52d1d9f193db997a7f4ca1ee74e178f (patch)
tree93d84b7e9e2af6cdda73df3e71226e16908e78fb /Documentation/git-update-index.txt
parent53f9a3e157dbbc901a02ac2c73346d375e24978c (diff)
downloadgit-388d0ff6e52d1d9f193db997a7f4ca1ee74e178f.tar.gz
git-update-index.txt: reword possibly confusing example
The following phrase could be interpreted multiple ways: "To pretend you have a file with mode and sha1 at path" In particular, I can think of two: 1. Pretend we have some new file, which happens to have a given mode and sha1 2. Pretend one of the files we are already tracking has a different mode and sha1 than what it really does I think people could easily assume either case while reading, but the example command provided doesn't actually handle the first case, which caused some minor frustration to at least one user. Modify the example command so that it correctly handles both cases, and re-order the wording in a way that makes it more likely folks will assume the first interpretation. I believe the new example shouldn't pose any obstacles to those wanting the second interpretation (at worst, they pass an unnecessary extra flag). Signed-off-by: Elijah Newren <newren@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.txt4
1 files changed, 2 insertions, 2 deletions
diff --git a/Documentation/git-update-index.txt b/Documentation/git-update-index.txt
index 4e8e762e68..a9753e6557 100644
--- a/Documentation/git-update-index.txt
+++ b/Documentation/git-update-index.txt
@@ -245,10 +245,10 @@ USING --CACHEINFO OR --INFO-ONLY
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 at path with mode and sha1, say:
----------------
-$ git update-index --cacheinfo <mode>,<sha1>,<path>
+$ git update-index --add --cacheinfo <mode>,<sha1>,<path>
----------------
`--info-only` is used to register files without placing them in the object