diff options
author | brian m. carlson <sandals@crustytoothpaste.net> | 2020-06-19 20:55:52 +0300 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2020-06-20 00:04:08 +0300 |
commit | 586740aa6e70013a837e0d9f3e0ea04c7f180fbd (patch) | |
tree | b2a857ee9fd89f8a1a42f18430652521f0327d59 /Documentation | |
parent | ac093d0790cf9073e6cb03744b1d0fbc1e07d3f7 (diff) |
builtin/index-pack: add option to specify hash algorithm
git index-pack is usually run in a repository, but need not be. Since
packs don't contains information on the algorithm in use, instead
relying on context, add an option to index-pack to tell it which one
we're using in case someone runs it outside of a repository. Since
using --stdin necessarily implies a repository, don't allow specifying
an object format if it's provided to prevent users from passing an
option that won't work. Add documentation for this option.
Signed-off-by: brian m. carlson <sandals@crustytoothpaste.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'Documentation')
-rw-r--r-- | Documentation/git-index-pack.txt | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/Documentation/git-index-pack.txt b/Documentation/git-index-pack.txt index d5b7560bfe..9316d9a80b 100644 --- a/Documentation/git-index-pack.txt +++ b/Documentation/git-index-pack.txt @@ -93,6 +93,14 @@ OPTIONS --max-input-size=<size>:: Die, if the pack is larger than <size>. +--object-format=<hash-algorithm>:: + Specify the given object format (hash algorithm) for the pack. 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. ++ +This option cannot be used with --stdin. + NOTES ----- |