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:
@ -176,8 +176,8 @@ int cmd_multi_pack_index(int argc, const char **argv,
|
|||||||
else if (!strcmp(argv[0], "expire"))
|
else if (!strcmp(argv[0], "expire"))
|
||||||
return cmd_multi_pack_index_expire(argc, argv);
|
return cmd_multi_pack_index_expire(argc, argv);
|
||||||
else {
|
else {
|
||||||
usage:
|
|
||||||
error(_("unrecognized subcommand: %s"), argv[0]);
|
error(_("unrecognized subcommand: %s"), argv[0]);
|
||||||
|
usage:
|
||||||
usage_with_options(builtin_multi_pack_index_usage,
|
usage_with_options(builtin_multi_pack_index_usage,
|
||||||
builtin_multi_pack_index_options);
|
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
|
test_done
|
||||||
|
Reference in New Issue
Block a user