Commit c45e978f authored by Remy Suen's avatar Remy Suen

Change function calls to field accesses instead

In details-for-tree-entry.js, there are several calls to functions of
an IndexEntry. However, those are actually fields on an object
instead of prototype functions so referring to them as functions will
cause a ReferenceError to be thrown. The fix is to not refer to them
as functions but to simply refer to them as fields instead.
Signed-off-by: default avatarRemy Suen <remy.suen@gmail.com>
parent 4611ca75
...@@ -17,10 +17,10 @@ nodegit.Repository.open(path.resolve(__dirname, "../.git")) ...@@ -17,10 +17,10 @@ nodegit.Repository.open(path.resolve(__dirname, "../.git"))
var indexEntry = index.getByPath(treeEntry.path()); var indexEntry = index.getByPath(treeEntry.path());
// With the index entry we can now view the details for the tree entry // With the index entry we can now view the details for the tree entry
console.log("Entry path: " + indexEntry.path()); console.log("Entry path: " + indexEntry.path);
console.log("Entry time in seconds: " + indexEntry.mtime().seconds()); console.log("Entry time in seconds: " + indexEntry.mtime.seconds());
console.log("Entry oid: " + indexEntry.id().toString()); console.log("Entry oid: " + indexEntry.id.toString());
console.log("Entry size: " + indexEntry.fileSize()); console.log("Entry size: " + indexEntry.fileSize);
}); });
}); });
}) })
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment