mirror of
https://git.proxmox.com/git/libgit2
synced 2025-05-09 20:29:27 +00:00
Fix the error pointed out by tanoku.
Now the code shoulb be c89.
This commit is contained in:
parent
f4c925c514
commit
1c68d27d07
@ -306,6 +306,9 @@ int git_tag_create_frombuffer(git_oid *oid, git_repository *repo, const char *bu
|
|||||||
int error;
|
int error;
|
||||||
git_odb_stream *stream;
|
git_odb_stream *stream;
|
||||||
|
|
||||||
|
git_reference *new_ref;
|
||||||
|
char ref_name[MAX_GITDIR_TREE_STRUCTURE_PATH_LENGTH];
|
||||||
|
|
||||||
assert(oid && buffer);
|
assert(oid && buffer);
|
||||||
|
|
||||||
memset(&tag, 0, sizeof(tag));
|
memset(&tag, 0, sizeof(tag));
|
||||||
@ -315,9 +318,6 @@ int git_tag_create_frombuffer(git_oid *oid, git_repository *repo, const char *bu
|
|||||||
if ((error = parse_tag_buffer(&tag, buffer, buffer + strlen(buffer))) < GIT_SUCCESS)
|
if ((error = parse_tag_buffer(&tag, buffer, buffer + strlen(buffer))) < GIT_SUCCESS)
|
||||||
return git__rethrow(error, "Failed to create tag");
|
return git__rethrow(error, "Failed to create tag");
|
||||||
|
|
||||||
git_reference *new_ref;
|
|
||||||
char ref_name[MAX_GITDIR_TREE_STRUCTURE_PATH_LENGTH];
|
|
||||||
|
|
||||||
if ((error = tag_valid_in_odb(&new_ref, ref_name, &tag.target, tag.type, repo, tag.tag_name)) < GIT_SUCCESS)
|
if ((error = tag_valid_in_odb(&new_ref, ref_name, &tag.target, tag.type, repo, tag.tag_name)) < GIT_SUCCESS)
|
||||||
return git__rethrow(error, "Failed to create tag");
|
return git__rethrow(error, "Failed to create tag");
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user