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

String `message` argument of `Stash.save` is optional by rcjsuen · Pull Request #1215 · 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  (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
5 changes: 5 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 @@ -2175,6 +2175,11 @@
}
},
"git_stash_save": {
"args": {
"message": {
"isOptional": true
}
},
"isAsync": true,
"return": {
"isErrorCode": true
Expand Down
12 changes: 9 additions & 3 deletions test/tests/stash.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 @@ -31,15 +31,13 @@ describe("Stash", function() {
});
});

it("can save and drop a stash", function() {
function saveDropStash(repo, stashMessage) {
var fileName = "README.md";
var fileContent = "Cha-cha-cha-chaaaaaangessssss";
var repo = this.repository;
var filePath = path.join(repo.workdir(), fileName);
var oldContent;
var stashes = [];
var stashOid;
var stashMessage = "stash test";

return fse.readFile(filePath)
.then(function(content) {
Expand Down Expand Up @@ -82,6 +80,14 @@ describe("Stash", function() {
return Promise.reject(e);
});
});
}

it("can save and drop a stash", function() {
saveDropStash(this.repository, "stash test");
});

it("can save a stash with no message and drop it", function() {
saveDropStash(this.repository, null);
});

it("can save and pop a stash", function() {
Expand Down

Back | FazBrowse Home | New Git URL