Files
git-mirror/builtin/show-index.c
Abhijeet Sonar 014299066b show-index: fix uninitialized hash function
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>
2024-10-27 20:09:04 -04:00

3.1 KiB