mirror of
https://git.proxmox.com/git/libgit2
synced 2026-01-05 20:07:07 +00:00
vector: avoid double asserting
index_initialize() calls assert() for arguments on its own. No need to call it twice. Signed-off-by: Kirill A. Shutemov <kirill@shutemov.name>
This commit is contained in:
parent
fad6607a55
commit
046dfea343
@ -178,7 +178,6 @@ static int index_initialize(git_index **index_out, git_repository *owner, const
|
||||
|
||||
int git_index_open(git_index **index_out, const char *index_path)
|
||||
{
|
||||
assert(index_out && index_path);
|
||||
return index_initialize(index_out, NULL, index_path);
|
||||
}
|
||||
|
||||
@ -187,8 +186,6 @@ int git_index_open(git_index **index_out, const char *index_path)
|
||||
*/
|
||||
int git_repository_index(git_index **index_out, git_repository *repo)
|
||||
{
|
||||
assert(index_out && repo);
|
||||
|
||||
if (repo->is_bare)
|
||||
return git__throw(GIT_EBAREINDEX, "Failed to open index. Repository is bare");
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user