Commit aa8a76eff9494e109c2c72c72ad687faaf05db3d

nulltoken 2012-11-17T05:12:14

tag: rename git_tag_type to git_tag_target_type

diff --git a/examples/general.c b/examples/general.c
index d9467f5..9ccb4c5 100644
--- a/examples/general.c
+++ b/examples/general.c
@@ -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);
 
diff --git a/include/git2/tag.h b/include/git2/tag.h
index 5602914..a1b685f 100644
--- a/include/git2/tag.h
+++ b/include/git2/tag.h
@@ -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
diff --git a/src/tag.c b/src/tag.c
index 4c3d811..13369d9 100644
--- a/src/tag.c
+++ b/src/tag.c
@@ -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;
diff --git a/tests-clar/object/tag/read.c b/tests-clar/object/tag/read.c
index 62dd4ca..53272e9 100644
--- a/tests-clar/object/tag/read.c
+++ b/tests-clar/object/tag/read.c
@@ -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);