diff options
author | brian m. carlson <sandals@crustytoothpaste.net> | 2020-05-25 19:59:12 (GMT) |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2020-05-27 17:07:07 (GMT) |
commit | 88a09a557c7571760b3ded75764bf3b1fd0e8bf0 (patch) | |
tree | c460af633418b672ccf4ae8e7fd1dd1fb166f712 /Documentation/git-show-index.txt | |
parent | 1610dda8ae5190438b3de205c2a0f87dfe878ca3 (diff) | |
download | git-88a09a557c7571760b3ded75764bf3b1fd0e8bf0.zip git-88a09a557c7571760b3ded75764bf3b1fd0e8bf0.tar.gz git-88a09a557c7571760b3ded75764bf3b1fd0e8bf0.tar.bz2 |
builtin/show-index: provide options to determine hash algo
show-index is capable of reading any possible index file whether or not
the index is inside a repository. However, because our index files lack
metadata about the hash algorithm in use, it's not possible to
autodetect the algorithm that a particular index file is using.
In order to allow us to read index files of any algorithm, let's set up
the .git directory gently so that we default to the algorithm for the
current repository, and add an --object-format option to allow users to
override this setting and continue to run show-index outside of a
repository altogether. Let's also document this new option so that
people can find it and use it.
Signed-off-by: brian m. carlson <sandals@crustytoothpaste.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'Documentation/git-show-index.txt')
-rw-r--r-- | Documentation/git-show-index.txt | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/Documentation/git-show-index.txt b/Documentation/git-show-index.txt index 424e4ba..39b1d8e 100644 --- a/Documentation/git-show-index.txt +++ b/Documentation/git-show-index.txt @@ -9,7 +9,7 @@ git-show-index - Show packed archive index SYNOPSIS -------- [verse] -'git show-index' +'git show-index' [--object-format=<hash-algorithm>] DESCRIPTION @@ -36,6 +36,15 @@ Note that you can get more information on a packfile by calling linkgit:git-verify-pack[1]. However, as this command considers only the index file itself, it's both faster and more flexible. +OPTIONS +------- + +--object-format=<hash-algorithm>:: + Specify the given object format (hash algorithm) for the index file. The + valid values are 'sha1' and (if enabled) 'sha256'. The default is the + algorithm for the current repository (set by `extensions.objectFormat`), or + 'sha1' if no value is set or outside a repository.. + GIT --- Part of the linkgit:git[1] suite |