aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--remote.c11
1 files changed, 6 insertions, 5 deletions
diff --git a/remote.c b/remote.c
index 246c8b92e2..fc5894e949 100644
--- a/remote.c
+++ b/remote.c
@@ -1876,9 +1876,9 @@ const char *branch_get_upstream(struct branch *branch, struct strbuf *err)
return branch->merge[0]->dst;
}
-static const char *tracking_for_push_dest(struct remote *remote,
- const char *refname,
- struct strbuf *err)
+static char *tracking_for_push_dest(struct remote *remote,
+ const char *refname,
+ struct strbuf *err)
{
char *ret;
@@ -1906,7 +1906,7 @@ static const char *branch_get_push_1(struct repository *repo,
if (remote->push.nr) {
char *dst;
- const char *ret;
+ char *ret;
dst = apply_refspecs(&remote->push, branch->refname);
if (!dst)
@@ -1936,7 +1936,8 @@ static const char *branch_get_push_1(struct repository *repo,
case PUSH_DEFAULT_UNSPECIFIED:
case PUSH_DEFAULT_SIMPLE:
{
- const char *up, *cur;
+ const char *up;
+ char *cur;
up = branch_get_upstream(branch, err);
if (!up)