Skip to content

Commit

Permalink
Remove unnecessary assignment of Commit#repo
Browse files Browse the repository at this point in the history
Repository#getCommit uses Commit.lookup and then manually assigns
to Commit#repo even though Commit.lookup already does that.
  • Loading branch information
tniessen committed Jan 19, 2020
1 parent 8ad3e37 commit c2b61a2
Showing 1 changed file with 0 additions and 2 deletions.
2 changes: 0 additions & 2 deletions lib/repository.js
Original file line number Diff line number Diff line change
Expand Up @@ -1143,8 +1143,6 @@ Repository.prototype.getCommit = function(oid, callback) {
var repository = this;

return Commit.lookup(repository, oid).then(function(commit) {
commit.repo = repository;

if (typeof callback === "function") {
callback(null, commit);
}
Expand Down

0 comments on commit c2b61a2

Please sign in to comment.