提交 57a8a876 编写于 作者: N nulltoken

Small code readability improvement.

上级 e80e77a1
......@@ -70,7 +70,9 @@ public object Resolve(string objectId, Type expectedType)
git_otype retrieved;
OperationResult result = LibGit2Api.wrapped_git_repository_lookup(out gitObjectPtr, out retrieved, _repositoryPtr, objectId);
if (result == OperationResult.GIT_SUCCESS && expected != git_otype.GIT_OBJ_ANY && retrieved != expected)
var expectedTypeHasBeenRetrieved = expected == git_otype.GIT_OBJ_ANY || retrieved == expected;
if (result == OperationResult.GIT_SUCCESS && !expectedTypeHasBeenRetrieved)
{
result = OperationResult.GIT_ENOTFOUND;
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册