mirror of
https://github.com/git/git.git
synced 2025-12-12 20:36:24 +01:00
As stated in the docs, show-index should use SHA1 as the default hash algorithm when run outsize of a repository. However, 'the_hash_algo' is currently left uninitialized if we are not in a repository and no explicit hash function is specified, causing a crash. Fix it by falling back to SHA1 when it is found uninitialized. Also add test that verifies this behaviour. Signed-off-by: Abhijeet Sonar <abhijeet.nkt@gmail.com> Signed-off-by: Taylor Blau <me@ttaylorr.com>
3.1 KiB
3.1 KiB