diff options
Diffstat (limited to 'builtin/remote.c')
-rw-r--r-- | builtin/remote.c | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/builtin/remote.c b/builtin/remote.c index 6273c0c23c..33ba739332 100644 --- a/builtin/remote.c +++ b/builtin/remote.c @@ -301,7 +301,7 @@ static int config_read_branches(const char *key, const char *value, void *cb) } string_list_append(&info->merge, xstrdup(value)); } else { - int v = git_config_maybe_bool(orig_key, value); + int v = git_parse_maybe_bool(value); if (v >= 0) info->rebase = v; else if (!strcmp(value, "preserve")) @@ -571,6 +571,7 @@ static int read_remote_branches(const char *refname, else item->util = NULL; } + strbuf_release(&buf); return 0; } @@ -595,6 +596,7 @@ static int migrate_file(struct remote *remote) unlink_or_warn(git_path("remotes/%s", remote->name)); else if (remote->origin == REMOTE_BRANCHES) unlink_or_warn(git_path("branches/%s", remote->name)); + strbuf_release(&buf); return 0; } @@ -1563,9 +1565,7 @@ static int set_url(int argc, const char **argv) "^$", 0); else git_config_set(name_buf.buf, newurl); - strbuf_release(&name_buf); - - return 0; + goto out; } /* Old URL specified. Demand that one matches. */ @@ -1588,6 +1588,8 @@ static int set_url(int argc, const char **argv) git_config_set_multivar(name_buf.buf, newurl, oldurl, 0); else git_config_set_multivar(name_buf.buf, NULL, oldurl, 1); +out: + strbuf_release(&name_buf); return 0; } |