Skip to content

Commit

Permalink
Merge pull request #1269 from rcjsuen/peel
Browse files Browse the repository at this point in the history
Add JavaScript version of `git_tag_peel()`
  • Loading branch information
cjhoward92 committed Dec 20, 2017
2 parents 4198db5 + 19e2405 commit d3fcc53
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 0 deletions.
8 changes: 8 additions & 0 deletions generate/input/descriptor.json
Original file line number Diff line number Diff line change
Expand Up @@ -2763,6 +2763,14 @@
"isErrorCode": true
},
"isAsync": true
},
"git_tag_peel": {
"args": {
"tag_target_out": {
"isReturn": true
}
},
"isAsync": true
}
}
},
Expand Down
10 changes: 10 additions & 0 deletions test/tests/tag.js
Original file line number Diff line number Diff line change
Expand Up @@ -220,4 +220,14 @@ describe("Tag", function() {
assert(object.type(), Obj.TYPE.TAG);
});
});

it("can peel a tag", function() {
return this.repository.getTagByName(tagName)
.then(function(tag) {
return tag.peel();
})
.then(function(object) {
assert.equal(object.isCommit(), true);
});
});
});

0 comments on commit d3fcc53

Please sign in to comment.