mirror of
https://git.proxmox.com/git/libgit2
synced 2025-06-24 18:02:30 +00:00
repository: clarify assignment and test order
This commit is contained in:
parent
351733128c
commit
9146f1e57e
@ -1500,12 +1500,12 @@ int git_repository_is_empty(git_repository *repo)
|
||||
if (git_reference_lookup(&head, repo, GIT_HEAD_FILE) < 0)
|
||||
return -1;
|
||||
|
||||
if (!(error = git_reference_type(head) == GIT_REF_SYMBOLIC))
|
||||
if (!((error = git_reference_type(head)) == GIT_REF_SYMBOLIC))
|
||||
goto cleanup;
|
||||
|
||||
if (!(error = strcmp(
|
||||
if (!(error = (strcmp(
|
||||
git_reference_symbolic_target(head),
|
||||
GIT_REFS_HEADS_DIR "master") == 0))
|
||||
GIT_REFS_HEADS_DIR "master") == 0)))
|
||||
goto cleanup;
|
||||
|
||||
error = repo_contains_no_reference(repo);
|
||||
|
Loading…
Reference in New Issue
Block a user