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

`ceiling_dirs` parameter in `Repository.discover` is optional by rcjsuen · Pull Request #1245 · nodegit/nodegit · GitHub

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

Filter by extension

Filter by extension .js  (1) .json  (1) All 2 file types 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
3 changes: 3 additions & 0 deletions generate/input/descriptor.json
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 @@ -2245,6 +2245,9 @@
"isErrorCode": true
},
"args": {
"ceiling_dirs": {
"isOptional": true
},
"out": {
"isReturn": true,
"isSelf": false,
Expand Down
14 changes: 12 additions & 2 deletions test/tests/repository.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 @@ -200,13 +200,23 @@ describe("Repository", function() {
});
});

it("can discover if a path is part of a repository", function() {
function discover(ceiling) {
var testPath = path.join(reposPath, "lib", "util", "normalize_oid.js");
var expectedPath = path.join(reposPath, ".git");
return NodeGit.Repository.discover(testPath, 0, "")
return NodeGit.Repository.discover(testPath, 0, ceiling)
.then(function(foundPath) {
assert.equal(expectedPath, foundPath);
});
}

it("can discover if a path is part of a repository, null ceiling",
function() {
return discover(null);
});

it("can discover if a path is part of a repository, empty ceiling",
function() {
return discover("");
});

it("can create a repo using initExt", function() {
Expand Down

Back | FazBrowse Home | New Git URL