Commit 1f501a086b4a9103f5ef5540c82c57d8559f0aff

Carlos Martín Nieto 2014-09-30T04:58:02

describe: rename _object() to _commit() We don't describe arbitrary object, so let's give it the name of the one object type we accept.

diff --git a/include/git2/describe.h b/include/git2/describe.h
index 8a00d25..0a845f6 100644
--- a/include/git2/describe.h
+++ b/include/git2/describe.h
@@ -55,7 +55,7 @@ typedef struct git_describe_opts {
 	GIT_DESCRIBE_DEFAULT_MAX_CANDIDATES_TAGS, \
 	GIT_DESCRIBE_DEFAULT_ABBREVIATED_SIZE}
 
-GIT_EXTERN(int) git_describe_object(
+GIT_EXTERN(int) git_describe_commit(
 	git_buf *out,
 	git_object *committish,
 	git_describe_opts *opts);
diff --git a/src/describe.c b/src/describe.c
index b503db7..c7b45d4 100644
--- a/src/describe.c
+++ b/src/describe.c
@@ -626,7 +626,7 @@ static int normalize_options(
 
 /** TODO: Add git_object_describe_workdir(git_buf *, const char *dirty_suffix, git_describe_opts *); */
 
-int git_describe_object(
+int git_describe_commit(
 	git_buf *out,
 	git_object *committish,
 	git_describe_opts *opts)
diff --git a/tests/describe/describe.c b/tests/describe/describe.c
index fcd4486..a7f3c84 100644
--- a/tests/describe/describe.c
+++ b/tests/describe/describe.c
@@ -39,7 +39,7 @@ void test_describe_describe__cannot_describe_against_a_repo_with_no_ref(void)
 
 	cl_git_pass(git_reference_foreach(repo, delete_cb, NULL));
 
-	cl_git_fail(git_describe_object(&buf, object, &opts));
+	cl_git_fail(git_describe_commit(&buf, object, &opts));
 
 	git_object_free(object);
 	git_buf_free(&buf);
diff --git a/tests/describe/describe_helpers.c b/tests/describe/describe_helpers.c
index aa2a54f..7235d32 100644
--- a/tests/describe/describe_helpers.c
+++ b/tests/describe/describe_helpers.c
@@ -12,7 +12,7 @@ void assert_describe(
 
 	cl_git_pass(git_revparse_single(&object, repo, revparse_spec));
 
-	cl_git_pass(git_describe_object(&label, object, opts));
+	cl_git_pass(git_describe_commit(&label, object, opts));
 
 	if (is_prefix_match)
 		cl_assert_equal_i(0, git__prefixcmp(git_buf_cstr(&label), expected_output));