tag: rename git_tag_type to git_tag_target_type

This commit is contained in:
nulltoken 2012-11-17 05:12:14 -08:00
parent 86b9dbc12f
commit aa8a76eff9
4 changed files with 4 additions and 4 deletions

View File

@ -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);

View File

@ -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

View File

@ -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;

View File

@ -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);