diff options
| author | David Glesser <glesserd@ensimag.fr> | 2011-05-30 09:03:55 +0200 |
|---|---|---|
| committer | David Glesser <glesserd@ensimag.fr> | 2011-05-30 09:03:55 +0200 |
| commit | 23123151e035f3565f7c9c93c1bbdb56c7cd6914 (patch) | |
| tree | adb27592c2705af3c655d5dce7100aa165b656fa /src | |
| parent | 448c4d012b9237541377d8d82684644c8a331902 (diff) | |
| download | libgit2-23123151e035f3565f7c9c93c1bbdb56c7cd6914.tar.gz | |
Set the oid when a tag already exists.
When a tag already exists, it can be useful to directly have the oid
of the existed tag, just after trying to add it.
Diffstat (limited to 'src')
| -rw-r--r-- | src/tag.c | 4 |
1 files changed, 3 insertions, 1 deletions
@@ -205,8 +205,10 @@ static int tag_create( switch (error) { case GIT_SUCCESS: - if (!allow_ref_overwrite) + if (!allow_ref_overwrite) { + git_oid_cpy(oid, git_reference_oid(new_ref)); return git__throw(GIT_EEXISTS, "Tag already exists"); + } should_update_ref = 1; /* Fall trough */ |
