Merge branch 'ua/update-update-server-info'
Code simplification. * ua/update-update-server-info: builtin/update-server-info: remove unnecessary if statement
This commit is contained in:
@@ -20,8 +20,8 @@ int cmd_update_server_info(int argc,
|
|||||||
OPT_END()
|
OPT_END()
|
||||||
};
|
};
|
||||||
|
|
||||||
if (repo)
|
repo_config(repo, git_default_config, NULL);
|
||||||
repo_config(repo, git_default_config, NULL);
|
|
||||||
argc = parse_options(argc, argv, prefix, options,
|
argc = parse_options(argc, argv, prefix, options,
|
||||||
update_server_info_usage, 0);
|
update_server_info_usage, 0);
|
||||||
if (argc > 0)
|
if (argc > 0)
|
||||||
|
|||||||
@@ -107,4 +107,11 @@ test_expect_success LIBCURL 'remote-http outside repository' '
|
|||||||
test_grep "^error: remote-curl" actual
|
test_grep "^error: remote-curl" actual
|
||||||
'
|
'
|
||||||
|
|
||||||
|
test_expect_success 'update-server-info does not crash with -h' '
|
||||||
|
test_expect_code 129 git update-server-info -h >usage &&
|
||||||
|
test_grep "[Uu]sage: git update-server-info " usage &&
|
||||||
|
test_expect_code 129 nongit git update-server-info -h >usage &&
|
||||||
|
test_grep "[Uu]sage: git update-server-info " usage
|
||||||
|
'
|
||||||
|
|
||||||
test_done
|
test_done
|
||||||
|
|||||||
Reference in New Issue
Block a user