FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

resolves #1433 TreeEntry#path should return posix path by mojavelinux · Pull Request #1434 · nodegit/nodegit · GitHub

Repository navigation

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension .js  (3) All 1 file type selected
Viewed files
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Unified
Split
Hide whitespace
Diff view
Unified
Split
Hide whitespace
2 changes: 1 addition & 1 deletion lib/tree_entry.js
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
var path = require("path");
var path = require("path").posix;
var NodeGit = require("../");
var TreeEntry = NodeGit.TreeEntry;

Expand Down
3 changes: 1 addition & 2 deletions test/tests/tree.js
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Original file line number Diff line number Diff line change
Expand Up @@ -44,8 +44,7 @@ describe("Tree", function() {
var repo = this.repository;
var file1 = "test.txt";
var file2 = "foo/bar.txt";
// index.addByPath doesn't like \s so normalize only for the expected paths
var expectedPaths = [file1, path.normalize(file2)];
var expectedPaths = [file1, file2];
var progressEntries = [];
var endEntries;

Expand Down
4 changes: 2 additions & 2 deletions test/tests/tree_entry.js
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ describe("TreeEntry", function() {
it("provides the full path", function() {
return this.commit.getEntry("test/raw-commit.js")
.then(function(entry) {
assert.equal(entry.path(), path.normalize("test/raw-commit.js"));
assert.equal(entry.path(), "test/raw-commit.js");
});
});

Expand All @@ -66,7 +66,7 @@ describe("TreeEntry", function() {
var dir = _dir || "",
testPromises = [];
tree.entries().forEach(function(entry) {
var currentPath = path.join(dir, entry.name());
var currentPath = path.posix.join(dir, entry.name());
if (entry.isTree()) {
testPromises.push(
entry.getTree().then(function (subtree) {
Expand Down

Back | FazBrowse Home | New Git URL