Commit 0142990
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 <[email protected]>
Signed-off-by: Taylor Blau <[email protected]>1 parent 6a11438 commit 0142990
2 files changed
+7
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
38 | 38 | | |
39 | 39 | | |
40 | 40 | | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
41 | 44 | | |
42 | 45 | | |
43 | 46 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
523 | 523 | | |
524 | 524 | | |
525 | 525 | | |
| 526 | + | |
| 527 | + | |
| 528 | + | |
| 529 | + | |
526 | 530 | | |
527 | 531 | | |
528 | 532 | | |
| |||
0 commit comments