diff options
| author | David Glesser <glesserd@ensimag.fr> | 2011-05-30 08:46:48 +0200 |
|---|---|---|
| committer | David Glesser <glesserd@ensimag.fr> | 2011-05-30 08:46:48 +0200 |
| commit | 448c4d012b9237541377d8d82684644c8a331902 (patch) | |
| tree | be8edf146aec37063ffd20b562a78a9c1c23b738 | |
| parent | 4191d529245084fa92e869aadda72dd740403d3a (diff) | |
| download | libgit2-448c4d012b9237541377d8d82684644c8a331902.tar.gz | |
Add an error message when a tag already exists.
Before this commit, no message is shown when doing a git_lasterror().
| -rw-r--r-- | src/tag.c | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -206,7 +206,7 @@ static int tag_create( switch (error) { case GIT_SUCCESS: if (!allow_ref_overwrite) - return GIT_EEXISTS; + return git__throw(GIT_EEXISTS, "Tag already exists"); should_update_ref = 1; /* Fall trough */ @@ -215,7 +215,7 @@ static int tag_create( break; default: - return error == GIT_SUCCESS ? GIT_SUCCESS : git__rethrow(error, "Failed to create tag"); + return git__rethrow(error, "Failed to create tag"); } if (!git_odb_exists(repo->db, target)) |
