Commit 786a17cd282cf81c76c45a8e62f2a1003235a673

nulltoken 2012-07-20T16:41:41

branch: enforce git_branch_delete() parameter checking

1
2
3
4
5
6
7
8
9
10
11
12
diff --git a/src/branch.c b/src/branch.c
index d0ebb2d..d11eca8 100644
--- a/src/branch.c
+++ b/src/branch.c
@@ -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)