mirror of
https://git.proxmox.com/git/libgit2
synced 2025-12-09 22:20:14 +00:00
tag: rename git_tag_type to git_tag_target_type
This commit is contained in:
parent
86b9dbc12f
commit
aa8a76eff9
@ -239,7 +239,7 @@ int main (int argc, char** argv)
|
||||
// the tagger (a git_signature - name, email, timestamp), and the tag message.
|
||||
git_tag_target((git_object **)&commit, tag);
|
||||
tname = git_tag_name(tag); // "test"
|
||||
ttype = git_tag_type(tag); // GIT_OBJ_COMMIT (otype enum)
|
||||
ttype = git_tag_target_type(tag); // GIT_OBJ_COMMIT (otype enum)
|
||||
tmessage = git_tag_message(tag); // "tag message\n"
|
||||
printf("Tag Message: %s\n", tmessage);
|
||||
|
||||
|
||||
@ -104,7 +104,7 @@ GIT_EXTERN(const git_oid *) git_tag_target_oid(git_tag *tag);
|
||||
* @param tag a previously loaded tag.
|
||||
* @return type of the tagged object
|
||||
*/
|
||||
GIT_EXTERN(git_otype) git_tag_type(git_tag *tag);
|
||||
GIT_EXTERN(git_otype) git_tag_target_type(git_tag *tag);
|
||||
|
||||
/**
|
||||
* Get the name of a tag
|
||||
|
||||
@ -39,7 +39,7 @@ const git_oid *git_tag_target_oid(git_tag *t)
|
||||
return &t->target;
|
||||
}
|
||||
|
||||
git_otype git_tag_type(git_tag *t)
|
||||
git_otype git_tag_target_type(git_tag *t)
|
||||
{
|
||||
assert(t);
|
||||
return t->type;
|
||||
|
||||
@ -38,7 +38,7 @@ void test_object_tag_read__parse(void)
|
||||
cl_git_pass(git_tag_lookup(&tag1, g_repo, &id1));
|
||||
|
||||
cl_assert_equal_s(git_tag_name(tag1), "test");
|
||||
cl_assert(git_tag_type(tag1) == GIT_OBJ_TAG);
|
||||
cl_assert(git_tag_target_type(tag1) == GIT_OBJ_TAG);
|
||||
|
||||
cl_git_pass(git_tag_target((git_object **)&tag2, tag1));
|
||||
cl_assert(tag2 != NULL);
|
||||
|
||||
Loading…
Reference in New Issue
Block a user