Skip to content
This repository was archived by the owner on Feb 6, 2025. It is now read-only.

Commit adfa35b

Browse files
committed
[nobug] Don't fetch the full parent commits for the JSON response
As the SHA value of the commits is the only information that's needed for the JSON, simply retrieve it via the commit object instead of fetching full commit objects for the parents. Signed-off-by: Remy Suen <[email protected]>
1 parent aff9514 commit adfa35b

File tree

1 file changed

+2
-5
lines changed

1 file changed

+2
-5
lines changed

modules/orionode/lib/git/commit.js

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -587,11 +587,8 @@ function countCommit(revWalk){
587587
}
588588

589589
function getCommitParents(repo, commit, fileDir) {
590-
return commit.getParents()
591-
.then(function(parents) {
592-
return parents.map(function(parent) {
593-
return createParentJSON(parent.sha(), fileDir);
594-
});
590+
return commit.parents().map(function(parent) {
591+
return createParentJSON(parent.toString(), fileDir);
595592
});
596593
}
597594

0 commit comments

Comments
 (0)