aboutsummaryrefslogtreecommitdiffstats
path: root/Documentation/git-update-index.txt
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2023-09-12 12:32:34 -0700
committerJunio C Hamano <gitster@pobox.com>2023-09-12 16:21:53 -0700
commit606e088d5d9af2393b4b05a8a180162c129cd734 (patch)
tree6684eaf70d5ce0a78944896aaae3a3e1f2c23405 /Documentation/git-update-index.txt
parent764b2330db42d07ed8c7d4f6c66a1d1203fb95de (diff)
downloadgit-606e088d5d9af2393b4b05a8a180162c129cd734.tar.gz
update-index: add --show-index-version
"git update-index --index-version N" is used to set the index format version to a specific version, but there was no way to query the current version used in the on-disk index file. Teach the command a new "--show-index-version" option, and also teach the "--index-version N" option to report what the version was when run with the "--verbose" option. Helped-by: Linus Arver <linusa@google.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.txt6
1 files changed, 5 insertions, 1 deletions
diff --git a/Documentation/git-update-index.txt b/Documentation/git-update-index.txt
index 71d6ef9457..1271486ae9 100644
--- a/Documentation/git-update-index.txt
+++ b/Documentation/git-update-index.txt
@@ -162,7 +162,8 @@ you will need to handle the situation manually.
Write the resulting index out in the named on-disk format version.
Supported versions are 2, 3 and 4. The current default version is 2
or 3, depending on whether extra features are used, such as
- `git add -N`.
+ `git add -N`. With `--verbose`, also report the version the index
+ file uses before and after this command.
+
Version 4 performs a simple pathname compression that reduces index
size by 30%-50% on large repositories, which results in faster load
@@ -171,6 +172,9 @@ and support for it was added to libgit2 in 2016 and to JGit in 2020.
Older versions of this manual page called it "relatively young", but
it should be considered mature technology these days.
+--show-index-version::
+ Report the index format version used by the on-disk index file.
+ See `--index-version` above.
-z::
Only meaningful with `--stdin` or `--index-info`; paths are