diff options
author | Ben Straub <bs@github.com> | 2013-04-09 05:03:51 +0400 |
---|---|---|
committer | Ben Straub <bs@github.com> | 2013-04-09 05:07:04 +0400 |
commit | 1aa21fe3b87a1e601023f49c41fab3ce76c189ac (patch) | |
tree | b25c258e7d360cb9dd7d278094ff12b490a0e61e /examples/diff.c | |
parent | 8480eef7ee0c8e52a8bf3ea12e5626009a966164 (diff) | |
download | libgit2-1aa21fe3b87a1e601023f49c41fab3ce76c189ac.tar.gz |
Deprecate git_revparse_single and _rangelike
Diffstat (limited to 'examples/diff.c')
-rw-r--r-- | examples/diff.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/examples/diff.c b/examples/diff.c index a153b493b..6fa0fee52 100644 --- a/examples/diff.c +++ b/examples/diff.c @@ -15,9 +15,11 @@ static int resolve_to_tree( git_repository *repo, const char *identifier, git_tree **tree) { int err = 0; + git_oid oid; git_object *obj = NULL; - if (git_revparse_single(&obj, repo, identifier) < 0) + if (git_revparse(&oid, NULL, NULL, repo, identifier) < 0 || + git_object_lookup(&obj, repo, &oid, GIT_OBJ_ANY) < 0) return GIT_ENOTFOUND; switch (git_object_type(obj)) { |