Skip to content

Commit cc05e51

Browse files
committed
Updated commit file function
1 parent 9a1cec3 commit cc05e51

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

lib/commit.js

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ function applyDetails(details, context) {
2727
* @param {RawCommit|Null} rawCommit
2828
* @return {Commit}
2929
*/
30-
var _Commit = function(rawCommit) {
30+
var Commit = function(rawCommit) {
3131
var self = {};
3232

3333
if(rawCommit && rawCommit instanceof git.raw.Commit) {
@@ -99,8 +99,8 @@ var _Commit = function(rawCommit) {
9999
return git.tree(self.repo, tree);
100100
};
101101

102-
self.file = function(path) {
103-
return self.tree().entry(path);
102+
self.file = function(path, callback) {
103+
self.tree().entry(path, callback);
104104
};
105105

106106
/**
@@ -144,7 +144,7 @@ var _Commit = function(rawCommit) {
144144
error = git.error(errorCode);
145145
return callback(error, null);
146146
}
147-
var parentCommit = new _Commit(parent);
147+
var parentCommit = new Commit(parent);
148148
parentCommit.fetchDetails(function returnParent(error) {
149149
callback(error, parentCommit);
150150
});
@@ -158,7 +158,7 @@ var _Commit = function(rawCommit) {
158158
* @return {Commit}
159159
*/
160160
self.parentSync = function(position) {
161-
var parent = new _Commit(self.commit.parentSync(position));
161+
var parent = new Commit(self.commit.parentSync(position));
162162
return parent.fetchDetailsSync();
163163
};
164164

@@ -192,4 +192,4 @@ var _Commit = function(rawCommit) {
192192
return self;
193193
};
194194

195-
exports.commit = _Commit;
195+
exports.commit = Commit;

0 commit comments

Comments
 (0)