Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mono/libgit2sharp.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authornulltoken <emeric.fermas@gmail.com>2011-05-03 17:22:58 +0400
committernulltoken <emeric.fermas@gmail.com>2011-05-03 17:22:58 +0400
commit51bc57b085e37e4311c386b75c424182c502a4a4 (patch)
tree4ba25e28ff2a3b35d4b02d041d90bb4cbc08c068 /LibGit2Sharp/TagCollection.cs
parent7f69dc1c2664a8dca370f8c0f7bf58885aabd1a1 (diff)
Port some tests from cgit and fix implementation to make them pass
Diffstat (limited to 'LibGit2Sharp/TagCollection.cs')
-rw-r--r--LibGit2Sharp/TagCollection.cs9
1 files changed, 8 insertions, 1 deletions
diff --git a/LibGit2Sharp/TagCollection.cs b/LibGit2Sharp/TagCollection.cs
index 17031e56..941bf5d7 100644
--- a/LibGit2Sharp/TagCollection.cs
+++ b/LibGit2Sharp/TagCollection.cs
@@ -120,7 +120,14 @@ namespace LibGit2Sharp
{
Ensure.ArgumentNotNullOrEmptyString(name, "name");
- repo.Refs.Delete(this[name].CanonicalName); //TODO: To be replaced by native libgit2 git_tag_delete() when available.
+ Tag tag = this[name];
+
+ if (tag == null)
+ {
+ throw new ApplicationException(String.Format("No tag identified by '{0}' can be found in the repository.", name));
+ }
+
+ repo.Refs.Delete(tag.CanonicalName); //TODO: To be replaced by native libgit2 git_tag_delete() when available.
}
private GitObject RetrieveObjectToTag(string target)