Commit 9d1507d1 by Yuang Li

correct use of feature flag

parent 397753f0
......@@ -502,12 +502,12 @@ int git_commit__parse_ext(git_commit *commit, git_odb_object *odb_obj, unsigned
{
int error;
if ((error = commit_parse(commit, git_odb_object_data(odb_obj),
git_odb_object_size(odb_obj), flags)) < 0)
return error;
if (GIT_OPT_ENABLE_SHALLOW) {
if (!git_shallow__enabled)
return 0;
git_repository *repo = git_object_owner((git_object *)commit);
git_commit_graft *graft;
......@@ -527,8 +527,6 @@ int git_commit__parse_ext(git_commit *commit, git_odb_object *odb_obj, unsigned
}
}
}
return 0;
}
......
......@@ -14,6 +14,7 @@
#include "common.h"
#include "commit.h"
#include "grafts.h"
#include "tag.h"
#include "blob.h"
#include "futils.h"
......@@ -926,7 +927,7 @@ int git_repository_open_ext(
if ((error = check_extensions(config, version)) < 0)
goto cleanup;
if (GIT_OPT_ENABLE_SHALLOW && (error = load_grafts(repo)) < 0)
if (git_shallow__enabled && (error = load_grafts(repo)) < 0)
goto cleanup;
if ((flags & GIT_REPOSITORY_OPEN_BARE) != 0)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment