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.
This commit is contained in:
Carlos Martín Nieto 2014-09-30 04:58:02 +02:00
parent af6cc38fc0
commit 1f501a086b
4 changed files with 4 additions and 4 deletions

View File

@ -55,7 +55,7 @@ typedef struct git_describe_opts {
GIT_DESCRIBE_DEFAULT_MAX_CANDIDATES_TAGS, \ GIT_DESCRIBE_DEFAULT_MAX_CANDIDATES_TAGS, \
GIT_DESCRIBE_DEFAULT_ABBREVIATED_SIZE} GIT_DESCRIBE_DEFAULT_ABBREVIATED_SIZE}
GIT_EXTERN(int) git_describe_object( GIT_EXTERN(int) git_describe_commit(
git_buf *out, git_buf *out,
git_object *committish, git_object *committish,
git_describe_opts *opts); git_describe_opts *opts);

View File

@ -626,7 +626,7 @@ static int normalize_options(
/** TODO: Add git_object_describe_workdir(git_buf *, const char *dirty_suffix, git_describe_opts *); */ /** 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_buf *out,
git_object *committish, git_object *committish,
git_describe_opts *opts) git_describe_opts *opts)

View File

@ -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_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_object_free(object);
git_buf_free(&buf); git_buf_free(&buf);

View File

@ -12,7 +12,7 @@ void assert_describe(
cl_git_pass(git_revparse_single(&object, repo, revparse_spec)); 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) if (is_prefix_match)
cl_assert_equal_i(0, git__prefixcmp(git_buf_cstr(&label), expected_output)); cl_assert_equal_i(0, git__prefixcmp(git_buf_cstr(&label), expected_output));