Skip to content

Commit 7209660

Browse files
committed
Bug error reporting
1 parent e191680 commit 7209660

2 files changed

Lines changed: 3 additions & 3 deletions

File tree

lib/revwalk.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,11 +41,11 @@ RevWalk.prototype.walk = function(oid, callback) {
4141

4242
function walk() {
4343
self.next(function revWalkNext(error, oid) {
44-
if (error) return callback(new git.error(error.message, error.code));
44+
if (error) return callback(error);
4545
if (!oid) return callback();
4646

4747
self.repo.getCommit(oid, function revWalkCommitLookup(error, commit) {
48-
if (error) return callback(new git.error(error.message, error.code));
48+
if (error) return callback(error);
4949

5050
callback(null, commit);
5151
walk();

lib/tree_builder.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,7 @@ function insertOneLevel(builder, parts, callback) {
123123
var entry = builder.get(part);
124124
if (entry) {
125125
if (!entry.isTree()) return callback("Invalid path part " + part);
126-
entry.parent = builder;
126+
entry.parent = builder;
127127

128128
entry.getTree(function(error, tree) {
129129
if (error) return callback(error);

0 commit comments

Comments
 (0)