mirror of
https://git.proxmox.com/git/libgit2
synced 2025-05-29 08:11:58 +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);
|
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 */
|
/* Create "remote/foo" branches for all remote branches */
|
||||||
error = git_remote_update_tips(remote, signature, git_buf_cstr(&reflog_msg_buf));
|
error = git_remote_update_tips(remote, signature, git_buf_cstr(&reflog_msg_buf));
|
||||||
git_buf_free(&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;
|
return error;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user