diff options
author | Edward Thomson <ethomson@edwardthomson.com> | 2021-01-31 00:36:54 +0000 |
---|---|---|
committer | Edward Thomson <ethomson@edwardthomson.com> | 2021-01-31 16:36:31 +0000 |
commit | 4732e03056b1b88fdeb3276d96dfd9400d75233a (patch) | |
tree | 6fee140f07bc425a16caa5c08ac39ef8bc993c8a /tests/refs/revparse.c | |
parent | 50f536222b6576a4204b980978d6094770a21038 (diff) | |
download | libgit2-ethomson/revparse.tar.gz |
revspec: rename git_revparse_mode_t to git_revspec_tethomson/revparse
The information about the type of a revision spec is not information
about the parser. Name it accordingly, so that `git_revparse_mode_t`
is now `git_revspec_t`. Deprecate the old name.
Diffstat (limited to 'tests/refs/revparse.c')
-rw-r--r-- | tests/refs/revparse.c | 26 |
1 files changed, 13 insertions, 13 deletions
diff --git a/tests/refs/revparse.c b/tests/refs/revparse.c index 3c4ed9af5..bc6e0a4c4 100644 --- a/tests/refs/revparse.c +++ b/tests/refs/revparse.c @@ -50,7 +50,7 @@ static void test_id_inrepo( const char *spec, const char *expected_left, const char *expected_right, - git_revparse_mode_t expected_flags, + git_revspec_t expected_flags, git_repository *repo) { git_revspec revspec; @@ -90,7 +90,7 @@ static void test_object_and_ref(const char *spec, const char *expected_oid, cons static void test_rangelike(const char *rangelike, const char *expected_left, const char *expected_right, - git_revparse_mode_t expected_revparseflags) + git_revspec_t expected_revparseflags) { char objstr[64] = {0}; git_revspec revspec; @@ -117,7 +117,7 @@ static void test_id( const char *spec, const char *expected_left, const char *expected_right, - git_revparse_mode_t expected_flags) + git_revspec_t expected_flags) { test_id_inrepo(spec, expected_left, expected_right, expected_flags, g_repo); } @@ -735,53 +735,53 @@ void test_refs_revparse__range(void) test_rangelike("be3563a^1..be3563a", "9fd738e8f7967c078dceed8190330fc8648ee56a", "be3563ae3f795b2b4353bcce3a527ad0a4f7f644", - GIT_REVPARSE_RANGE); + GIT_REVSPEC_RANGE); test_rangelike("be3563a^1...be3563a", "9fd738e8f7967c078dceed8190330fc8648ee56a", "be3563ae3f795b2b4353bcce3a527ad0a4f7f644", - GIT_REVPARSE_RANGE | GIT_REVPARSE_MERGE_BASE); + GIT_REVSPEC_RANGE | GIT_REVSPEC_MERGE_BASE); test_rangelike("be3563a^1.be3563a", NULL, NULL, 0); } void test_refs_revparse__parses_range_operator(void) { - test_id("HEAD", "a65fedf39aefe402d3bb6e24df4d4f5fe4547750", NULL, GIT_REVPARSE_SINGLE); + test_id("HEAD", "a65fedf39aefe402d3bb6e24df4d4f5fe4547750", NULL, GIT_REVSPEC_SINGLE); test_id("HEAD~3..HEAD", "4a202b346bb0fb0db7eff3cffeb3c70babbd2045", "a65fedf39aefe402d3bb6e24df4d4f5fe4547750", - GIT_REVPARSE_RANGE); + GIT_REVSPEC_RANGE); test_id("HEAD~3...HEAD", "4a202b346bb0fb0db7eff3cffeb3c70babbd2045", "a65fedf39aefe402d3bb6e24df4d4f5fe4547750", - GIT_REVPARSE_RANGE | GIT_REVPARSE_MERGE_BASE); + GIT_REVSPEC_RANGE | GIT_REVSPEC_MERGE_BASE); test_id("HEAD~3..", "4a202b346bb0fb0db7eff3cffeb3c70babbd2045", "a65fedf39aefe402d3bb6e24df4d4f5fe4547750", - GIT_REVPARSE_RANGE); + GIT_REVSPEC_RANGE); test_id("HEAD~3...", "4a202b346bb0fb0db7eff3cffeb3c70babbd2045", "a65fedf39aefe402d3bb6e24df4d4f5fe4547750", - GIT_REVPARSE_RANGE | GIT_REVPARSE_MERGE_BASE); + GIT_REVSPEC_RANGE | GIT_REVSPEC_MERGE_BASE); test_id("..HEAD~3", "a65fedf39aefe402d3bb6e24df4d4f5fe4547750", "4a202b346bb0fb0db7eff3cffeb3c70babbd2045", - GIT_REVPARSE_RANGE); + GIT_REVSPEC_RANGE); test_id("...HEAD~3", "a65fedf39aefe402d3bb6e24df4d4f5fe4547750", "4a202b346bb0fb0db7eff3cffeb3c70babbd2045", - GIT_REVPARSE_RANGE | GIT_REVPARSE_MERGE_BASE); + GIT_REVSPEC_RANGE | GIT_REVSPEC_MERGE_BASE); test_id("...", "a65fedf39aefe402d3bb6e24df4d4f5fe4547750", "a65fedf39aefe402d3bb6e24df4d4f5fe4547750", - GIT_REVPARSE_RANGE | GIT_REVPARSE_MERGE_BASE); + GIT_REVSPEC_RANGE | GIT_REVSPEC_MERGE_BASE); test_invalid_revspec(".."); } |