diff options
author | nulltoken <emeric.fermas@gmail.com> | 2011-06-29 19:06:20 +0400 |
---|---|---|
committer | nulltoken <emeric.fermas@gmail.com> | 2011-07-14 17:52:08 +0400 |
commit | 148fb75694843787b3d80ecd3e4d3dc5229dab61 (patch) | |
tree | aeae68b029ac6b639fcc8c3d8dc43ad22dee49bc /LibGit2Sharp/TagCollection.cs | |
parent | dbf812da22d950481a286a7287913d2e834ad117 (diff) |
Update libgit2 binaries to 33afca4
Final fixes for issue #51, #52 and #53.
Diffstat (limited to 'LibGit2Sharp/TagCollection.cs')
-rw-r--r-- | LibGit2Sharp/TagCollection.cs | 12 |
1 files changed, 3 insertions, 9 deletions
diff --git a/LibGit2Sharp/TagCollection.cs b/LibGit2Sharp/TagCollection.cs index 0baeec64..e392792d 100644 --- a/LibGit2Sharp/TagCollection.cs +++ b/LibGit2Sharp/TagCollection.cs @@ -78,17 +78,11 @@ namespace LibGit2Sharp GitObject objectToTag = RetrieveObjectToTag(target); - var targetOid = objectToTag.Id.Oid; - GitOid oid; int res; - - if (allowOverwrite) - { - res = NativeMethods.git_tag_create_f(out oid, repo.Handle, name, ref targetOid, GitObject.TypeToTypeMap[objectToTag.GetType()], tagger.Handle, message); - } - else + using (var objectPtr = new ObjectSafeWrapper(objectToTag.Id, repo)) { - res = NativeMethods.git_tag_create(out oid, repo.Handle, name, ref targetOid, GitObject.TypeToTypeMap[objectToTag.GetType()], tagger.Handle, message); + GitOid oid; + res = NativeMethods.git_tag_create(out oid, repo.Handle, name, objectPtr.ObjectPtr, tagger.Handle, message, allowOverwrite); } Ensure.Success(res); |