summaryrefslogtreecommitdiff
path: root/examples/rev-parse.c
diff options
context:
space:
mode:
authorEdward Thomson <ethomson@edwardthomson.com>2021-01-31 00:36:54 +0000
committerEdward Thomson <ethomson@edwardthomson.com>2021-01-31 16:36:31 +0000
commit4732e03056b1b88fdeb3276d96dfd9400d75233a (patch)
tree6fee140f07bc425a16caa5c08ac39ef8bc993c8a /examples/rev-parse.c
parent50f536222b6576a4204b980978d6094770a21038 (diff)
downloadlibgit2-4732e03056b1b88fdeb3276d96dfd9400d75233a.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 'examples/rev-parse.c')
-rw-r--r--examples/rev-parse.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/examples/rev-parse.c b/examples/rev-parse.c
index 7d6e9986f..90258c101 100644
--- a/examples/rev-parse.c
+++ b/examples/rev-parse.c
@@ -69,17 +69,17 @@ static int parse_revision(git_repository *repo, struct parse_state *ps)
check_lg2(git_revparse(&rs, repo, ps->spec), "Could not parse", ps->spec);
- if ((rs.flags & GIT_REVPARSE_SINGLE) != 0) {
+ if ((rs.flags & GIT_REVSPEC_SINGLE) != 0) {
git_oid_tostr(str, sizeof(str), git_object_id(rs.from));
printf("%s\n", str);
git_object_free(rs.from);
}
- else if ((rs.flags & GIT_REVPARSE_RANGE) != 0) {
+ else if ((rs.flags & GIT_REVSPEC_RANGE) != 0) {
git_oid_tostr(str, sizeof(str), git_object_id(rs.to));
printf("%s\n", str);
git_object_free(rs.to);
- if ((rs.flags & GIT_REVPARSE_MERGE_BASE) != 0) {
+ if ((rs.flags & GIT_REVSPEC_MERGE_BASE) != 0) {
git_oid base;
check_lg2(git_merge_base(&base, repo,
git_object_id(rs.from), git_object_id(rs.to)),