aboutsummaryrefslogtreecommitdiffstats
path: root/Documentation/git-index-pack.txt
diff options
context:
space:
mode:
authorbrian m. carlson <sandals@crustytoothpaste.net>2020-06-19 17:55:52 +0000
committerJunio C Hamano <gitster@pobox.com>2020-06-19 14:04:08 -0700
commit586740aa6e70013a837e0d9f3e0ea04c7f180fbd (patch)
treeb2a857ee9fd89f8a1a42f18430652521f0327d59 /Documentation/git-index-pack.txt
parentac093d0790cf9073e6cb03744b1d0fbc1e07d3f7 (diff)
downloadgit-586740aa6e70013a837e0d9f3e0ea04c7f180fbd.tar.gz
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/git-index-pack.txt')
-rw-r--r--Documentation/git-index-pack.txt8
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
-----