diff options
author | Edward Thomson <ethomson@edwardthomson.com> | 2017-09-12 20:21:27 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-09-12 20:21:27 +0200 |
commit | e098b5f5071ca3eeee138785de1b8db3c1152f8d (patch) | |
tree | a34254140b445e22b958c50364bef12c6e95ff79 | |
parent | 71a8204d380f02d379d85706ba1e1ec32d9e6c2c (diff) | |
parent | b34fc3fdf6071365cb5585ed929bd3dc714b67c0 (diff) | |
download | libgit2-e098b5f5071ca3eeee138785de1b8db3c1152f8d.tar.gz |
Merge pull request #4344 from slavikus/fix-dirty-buffer-in-git-push-update-tips
Clear the remote_ref_name buffer in git_push_update_tips()
-rw-r--r-- | src/push.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/push.c b/src/push.c index c2abbb91f..41b66df06 100644 --- a/src/push.c +++ b/src/push.c @@ -178,6 +178,9 @@ int git_push_update_tips(git_push *push, const git_remote_callbacks *callbacks) if (!fetch_spec) continue; + /* Clear the buffer which can be dirty from previous iteration */ + git_buf_clear(&remote_ref_name); + if ((error = git_refspec_transform(&remote_ref_name, fetch_spec, status->ref)) < 0) goto on_error; |