Unverified Commit d3fcc530 authored by Carson Howard's avatar Carson Howard Committed by GitHub

Merge pull request #1269 from rcjsuen/peel

Add JavaScript version of `git_tag_peel()`
parents 4198db5e 19e24053
...@@ -2763,6 +2763,14 @@ ...@@ -2763,6 +2763,14 @@
"isErrorCode": true "isErrorCode": true
}, },
"isAsync": true "isAsync": true
},
"git_tag_peel": {
"args": {
"tag_target_out": {
"isReturn": true
}
},
"isAsync": true
} }
} }
}, },
......
...@@ -220,4 +220,14 @@ describe("Tag", function() { ...@@ -220,4 +220,14 @@ describe("Tag", function() {
assert(object.type(), Obj.TYPE.TAG); 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);
});
});
}); });
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment