On 28/10/24 05:40, Taylor Blau wrote: > On Sat, Oct 26, 2024 at 05:39:50PM +0530, Abhijeet Sonar wrote: >> 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. > > This commit description is good, and would benefit further from a > bisection showing where the regression began. I don't think that it is a > prerequisite for us moving this patch forward, though. On bisecting, the offending commit appears to be c8aed5e8da (repository: stop setting SHA1 as the default object hash). Another related commit is ab274909d4 (builtin/diff: explicitly set hash algo when there is no repo) which did something very similar to my patch. Thanks