diff options
author | Edward Thomson <ethomson@edwardthomson.com> | 2023-04-22 23:12:00 +0100 |
---|---|---|
committer | Edward Thomson <ethomson@edwardthomson.com> | 2023-04-22 23:17:32 +0100 |
commit | 190a4c55df72b32adf4d60f77cbc47276b74f84b (patch) | |
tree | 896d6d41c2ea6305992bd646bbbe79a3fdb5f6fe /src/libgit2/commit_list.c | |
parent | e288f874a3a73ef31f88bb524f6d25d5ff3c5a3a (diff) | |
parent | 8a62616f43fe5ea37d41296f40293ff97aa88cfa (diff) | |
download | libgit2-190a4c55df72b32adf4d60f77cbc47276b74f84b.tar.gz |
Merge remote-tracking branch 'origin/main' into shallow-clone-network
Diffstat (limited to 'src/libgit2/commit_list.c')
-rw-r--r-- | src/libgit2/commit_list.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/libgit2/commit_list.c b/src/libgit2/commit_list.c index 12b329b25..485871db3 100644 --- a/src/libgit2/commit_list.c +++ b/src/libgit2/commit_list.c @@ -125,7 +125,7 @@ static int commit_quick_parse( git_oid *parent_oid; git_commit *commit; git_commit__parse_options parse_opts = { - GIT_OID_SHA1, + walk->repo->oid_type, GIT_COMMIT_PARSE_QUICK }; size_t i; @@ -176,7 +176,9 @@ int git_commit_list_parse(git_revwalk *walk, git_commit_list_node *commit) if (cgraph_file) { git_commit_graph_entry e; - error = git_commit_graph_entry_find(&e, cgraph_file, &commit->oid, GIT_OID_SHA1_SIZE); + error = git_commit_graph_entry_find(&e, cgraph_file, + &commit->oid, git_oid_size(walk->repo->oid_type)); + if (error == 0 && git__is_uint16(e.parent_count)) { size_t i; commit->generation = (uint32_t)e.generation; |