Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.kernel.org/pub/scm/git/git.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'remote.c')
-rw-r--r--remote.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/remote.c b/remote.c
index a81f2e2f17..6e13993bdc 100644
--- a/remote.c
+++ b/remote.c
@@ -350,7 +350,8 @@ static void read_branches_file(struct remote_state *remote_state,
remote->fetch_tags = 1; /* always auto-follow */
}
-static int handle_config(const char *key, const char *value, void *cb)
+static int handle_config(const char *key, const char *value,
+ const struct config_context *ctx, void *cb)
{
const char *name;
size_t namelen;
@@ -358,6 +359,7 @@ static int handle_config(const char *key, const char *value, void *cb)
struct remote *remote;
struct branch *branch;
struct remote_state *remote_state = cb;
+ const struct key_value_info *kvi = ctx->kvi;
if (parse_config_key(key, "branch", &name, &namelen, &subkey) >= 0) {
/* There is no subsection. */
@@ -415,8 +417,8 @@ static int handle_config(const char *key, const char *value, void *cb)
}
remote = make_remote(remote_state, name, namelen);
remote->origin = REMOTE_CONFIG;
- if (current_config_scope() == CONFIG_SCOPE_LOCAL ||
- current_config_scope() == CONFIG_SCOPE_WORKTREE)
+ if (kvi->scope == CONFIG_SCOPE_LOCAL ||
+ kvi->scope == CONFIG_SCOPE_WORKTREE)
remote->configured_in_repo = 1;
if (!strcmp(subkey, "mirror"))
remote->mirror = git_config_bool(key, value);