Skip to content

Commit 9ee7a9d

Browse files
committed
Make RevertOptions parameter optional in Revert.revert
libgit2's git_revert function does not require the revert options to be specified so the same should apply to the NodeGit API.
1 parent 3e06530 commit 9ee7a9d

File tree

2 files changed

+12
-0
lines changed

2 files changed

+12
-0
lines changed

generate/input/descriptor.json

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2044,6 +2044,11 @@
20442044
"functions": {
20452045
"git_revert": {
20462046
"isAsync": true,
2047+
"args": {
2048+
"given_opts": {
2049+
"isOptional": true
2050+
}
2051+
},
20472052
"return": {
20482053
"isErrorCode": true
20492054
}

test/tests/revert.js

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,4 +60,11 @@ describe("Revert", function() {
6060
assert.ok(_.endsWith(fileName, entries[0].path));
6161
});
6262
});
63+
64+
it("RevertOptions is optional", function() {
65+
return Revert.revert(test.repository, test.firstCommit, null)
66+
.catch(function(error) {
67+
throw error;
68+
});
69+
});
6370
});

0 commit comments

Comments
 (0)