mirror of
https://git.proxmox.com/git/libgit2
synced 2025-08-06 08:24:01 +00:00
branch: enforce git_branch_delete() parameter checking
This commit is contained in:
parent
ef4d795ec5
commit
786a17cd28
@ -110,6 +110,7 @@ int git_branch_delete(git_repository *repo, const char *branch_name, git_branch_
|
||||
git_reference *head = NULL;
|
||||
int error;
|
||||
|
||||
assert(repo && branch_name);
|
||||
assert((branch_type == GIT_BRANCH_LOCAL) || (branch_type == GIT_BRANCH_REMOTE));
|
||||
|
||||
if ((error = retrieve_branch_reference(&branch, repo, branch_name, branch_type == GIT_BRANCH_REMOTE)) < 0)
|
||||
|
Loading…
Reference in New Issue
Block a user