mirror of
https://git.proxmox.com/git/libgit2
synced 2025-05-29 17:05:49 +00:00
fetch: prune after updating tips
This makes a fetch+prune more similar to a connect+prune and makes it more likely that we see errors in the decision to prune a reference.
This commit is contained in:
parent
4aa2336966
commit
8c13eaedbb
@ -926,12 +926,15 @@ int git_remote_fetch(
|
||||
remote->name ? remote->name : remote->url);
|
||||
}
|
||||
|
||||
if (remote->prune_refs && (error = git_remote_prune(remote)) < 0)
|
||||
return error;
|
||||
|
||||
/* Create "remote/foo" branches for all remote branches */
|
||||
error = git_remote_update_tips(remote, signature, git_buf_cstr(&reflog_msg_buf));
|
||||
git_buf_free(&reflog_msg_buf);
|
||||
if (error < 0)
|
||||
return error;
|
||||
|
||||
if (remote->prune_refs)
|
||||
error = git_remote_prune(remote);
|
||||
|
||||
return error;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user