summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorPierre-Olivier Latour <pol@mac.com>2015-03-05 23:06:31 -0800
committerPierre-Olivier Latour <pol@mac.com>2015-03-11 11:51:12 -0700
commit1034f1b583e4bfe39d46243568aafb27e725f2fa (patch)
treeeb809594ccfe243a955fd708b0251bacee3f02aa /src
parente22ffb42097671f1c6737be4c8bbf2ff36a9e290 (diff)
downloadlibgit2-1034f1b583e4bfe39d46243568aafb27e725f2fa.tar.gz
Fixed active refspecs not reset by git_remote_upload()
Diffstat (limited to 'src')
-rw-r--r--src/remote.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/remote.c b/src/remote.c
index 4924bf83a..3a2a8d007 100644
--- a/src/remote.c
+++ b/src/remote.c
@@ -2329,6 +2329,10 @@ int git_remote_upload(git_remote *remote, const git_strarray *refspecs, const gi
(error = git_remote_connect(remote, GIT_DIRECTION_PUSH)) < 0)
goto cleanup;
+ free_refspecs(&remote->active_refspecs);
+ if (dwim_refspecs(&remote->active_refspecs, &remote->refspecs, &remote->refs) < 0)
+ goto cleanup;
+
if (remote->push) {
git_push_free(remote->push);
remote->push = NULL;