]> git.ipfire.org Git - thirdparty/git.git/commit - builtin/index-pack.c
builtin/index-pack: add option to specify hash algorithm
authorbrian m. carlson <sandals@crustytoothpaste.net>
Fri, 19 Jun 2020 17:55:52 +0000 (17:55 +0000)
committerJunio C Hamano <gitster@pobox.com>
Fri, 19 Jun 2020 21:04:08 +0000 (14:04 -0700)
commit586740aa6e70013a837e0d9f3e0ea04c7f180fbd
treeb2a857ee9fd89f8a1a42f18430652521f0327d59
parentac093d0790cf9073e6cb03744b1d0fbc1e07d3f7
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>
Documentation/git-index-pack.txt
builtin/index-pack.c