[PATCH 1/2] for-each-repo: stop using the_repository
From: Derrick Stolee <stolee@gmail.com>
This is a simple refactor before digging into a bug fix.
Signed-off-by: Derrick Stolee <stolee@gmail.com>
---
builtin/for-each-repo.c | 6 ++----
1 file changed, 2 insertions(+), 4 deletions(-)
diff --git a/builtin/for-each-repo.c b/builtin/for-each-repo.c
index 325a7925f1..478ccf1287 100644
--- a/builtin/for-each-repo.c
+++ b/builtin/for-each-repo.c
@@ -1,5 +1,3 @@
-#define USE_THE_REPOSITORY_VARIABLE
-
#include "builtin.h"
#include "config.h"
#include "gettext.h"
@@ -33,7 +31,7 @@ static int run_command_on_repo(const char *path, int argc, const char ** argv)
int cmd_for_each_repo(int argc,
const char **argv,
const char *prefix,
- struct repository *repo UNUSED)
+ struct repository *repo)
{
static const char *config_key = NULL;
int keep_going = 0;
@@ -55,7 +53,7 @@ int cmd_for_each_repo(int argc,
if (!config_key)
die(_("missing --config=<config>"));
- err = repo_config_get_string_multi(the_repository, config_key, &values);
+ err = repo_config_get_string_multi(repo, config_key, &values);
if (err < 0)
usage_msg_optf(_("got bad config --config=%s"),
for_each_repo_usage, options, config_key);
--
gitgitgadget