Skip to content

Commit ee8020f

Browse files
committed
Merge branch 'ua/update-server-info-sans-the-repository'
Code clean-up. * ua/update-server-info-sans-the-repository: builtin/update-server-info: remove the_repository global variable
2 parents b838bf1 + 62898b8 commit ee8020f

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

builtin/update-server-info.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
#define USE_THE_REPOSITORY_VARIABLE
21
#include "builtin.h"
32
#include "config.h"
43
#include "gettext.h"
@@ -13,19 +12,20 @@ static const char * const update_server_info_usage[] = {
1312
int cmd_update_server_info(int argc,
1413
const char **argv,
1514
const char *prefix,
16-
struct repository *repo UNUSED)
15+
struct repository *repo)
1716
{
1817
int force = 0;
1918
struct option options[] = {
2019
OPT__FORCE(&force, N_("update the info files from scratch"), 0),
2120
OPT_END()
2221
};
2322

24-
git_config(git_default_config, NULL);
23+
if (repo)
24+
repo_config(repo, git_default_config, NULL);
2525
argc = parse_options(argc, argv, prefix, options,
2626
update_server_info_usage, 0);
2727
if (argc > 0)
2828
usage_with_options(update_server_info_usage, options);
2929

30-
return !!update_server_info(the_repository, force);
30+
return !!update_server_info(repo, force);
3131
}

0 commit comments

Comments
 (0)