Skip to content

Commit e098b5f

Browse files
authored
Merge pull request libgit2#4344 from slavikus/fix-dirty-buffer-in-git-push-update-tips
Clear the remote_ref_name buffer in git_push_update_tips()
2 parents 71a8204 + b34fc3f commit e098b5f

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

src/push.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -178,6 +178,9 @@ int git_push_update_tips(git_push *push, const git_remote_callbacks *callbacks)
178178
if (!fetch_spec)
179179
continue;
180180

181+
/* Clear the buffer which can be dirty from previous iteration */
182+
git_buf_clear(&remote_ref_name);
183+
181184
if ((error = git_refspec_transform(&remote_ref_name, fetch_spec, status->ref)) < 0)
182185
goto on_error;
183186

0 commit comments

Comments
 (0)