]> git.ipfire.org Git - thirdparty/git.git/commit - git.c
builtin/show-index: provide options to determine hash algo
authorbrian m. carlson <sandals@crustytoothpaste.net>
Mon, 25 May 2020 19:59:12 +0000 (19:59 +0000)
committerJunio C Hamano <gitster@pobox.com>
Wed, 27 May 2020 17:07:07 +0000 (10:07 -0700)
commit88a09a557c7571760b3ded75764bf3b1fd0e8bf0
treec460af633418b672ccf4ae8e7fd1dd1fb166f712
parent1610dda8ae5190438b3de205c2a0f87dfe878ca3
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>
Documentation/git-show-index.txt
builtin/show-index.c
git.c