Merge branch 'tb/reverse-midx'
The code that gives an error message in "git multi-pack-index" when no subcommand is given tried to print a NULL pointer as a strong, which has been corrected. * tb/reverse-midx: multi-pack-index: fix potential segfault without sub-command
This commit is contained in:
commit
7f554a4f69
@ -176,8 +176,8 @@ int cmd_multi_pack_index(int argc, const char **argv,
|
||||
else if (!strcmp(argv[0], "expire"))
|
||||
return cmd_multi_pack_index_expire(argc, argv);
|
||||
else {
|
||||
usage:
|
||||
error(_("unrecognized subcommand: %s"), argv[0]);
|
||||
usage:
|
||||
usage_with_options(builtin_multi_pack_index_usage,
|
||||
builtin_multi_pack_index_options);
|
||||
}
|
||||
|
@ -837,4 +837,9 @@ test_expect_success 'load reverse index when missing .idx, .pack' '
|
||||
)
|
||||
'
|
||||
|
||||
test_expect_success 'usage shown without sub-command' '
|
||||
test_expect_code 129 git multi-pack-index 2>err &&
|
||||
! test_i18ngrep "unrecognized subcommand" err
|
||||
'
|
||||
|
||||
test_done
|
||||
|
Loading…
Reference in New Issue
Block a user