summaryrefslogtreecommitdiff
path: root/branch.c
diff options
context:
space:
mode:
Diffstat (limited to 'branch.c')
-rw-r--r--branch.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/branch.c b/branch.c
index 6d01d7d6bd..26be358347 100644
--- a/branch.c
+++ b/branch.c
@@ -116,7 +116,7 @@ static int install_branch_config_multiple_remotes(int flag, const char *local,
}
strbuf_addf(&key, "branch.%s.remote", local);
- if (git_config_set_gently(key.buf, origin ? origin : ".") < 0)
+ if (repo_config_set_gently(the_repository, key.buf, origin ? origin : ".") < 0)
goto out_err;
strbuf_reset(&key);
@@ -127,16 +127,16 @@ static int install_branch_config_multiple_remotes(int flag, const char *local,
* more than one is provided, use CONFIG_REGEX_NONE to preserve what
* we've written so far.
*/
- if (git_config_set_gently(key.buf, NULL) < 0)
+ if (repo_config_set_gently(the_repository, key.buf, NULL) < 0)
goto out_err;
for_each_string_list_item(item, remotes)
- if (git_config_set_multivar_gently(key.buf, item->string, CONFIG_REGEX_NONE, 0) < 0)
+ if (repo_config_set_multivar_gently(the_repository, key.buf, item->string, CONFIG_REGEX_NONE, 0) < 0)
goto out_err;
if (rebasing) {
strbuf_reset(&key);
strbuf_addf(&key, "branch.%s.rebase", local);
- if (git_config_set_gently(key.buf, "true") < 0)
+ if (repo_config_set_gently(the_repository, key.buf, "true") < 0)
goto out_err;
}
strbuf_release(&key);
@@ -230,7 +230,7 @@ static int inherit_tracking(struct tracking *tracking, const char *orig_ref)
return -1;
}
- if (branch->merge_nr < 1 || !branch->merge_name || !branch->merge_name[0]) {
+ if (branch->merge_nr < 1 || !branch->merge || !branch->merge[0] || !branch->merge[0]->src) {
warning(_("asked to inherit tracking from '%s', but no merge configuration is set"),
bare_ref);
return -1;
@@ -238,7 +238,7 @@ static int inherit_tracking(struct tracking *tracking, const char *orig_ref)
tracking->remote = branch->remote_name;
for (i = 0; i < branch->merge_nr; i++)
- string_list_append(tracking->srcs, branch->merge_name[i]);
+ string_list_append(tracking->srcs, branch->merge[i]->src);
return 0;
}
@@ -355,7 +355,7 @@ int read_branch_desc(struct strbuf *buf, const char *branch_name)
char *v = NULL;
struct strbuf name = STRBUF_INIT;
strbuf_addf(&name, "branch.%s.description", branch_name);
- if (git_config_get_string(name.buf, &v)) {
+ if (repo_config_get_string(the_repository, name.buf, &v)) {
strbuf_release(&name);
return -1;
}