Examples: fix reference names
diff --git a/examples/diff.c b/examples/diff.c
index 38231d2..c569b86 100644
--- a/examples/diff.c
+++ b/examples/diff.c
@@ -30,7 +30,7 @@ static int resolve_to_tree(
git_reference_resolve(&resolved, ref);
git_reference_free(ref);
if (resolved) {
- git_object_lookup(&obj, repo, git_reference_oid(resolved), GIT_OBJ_ANY);
+ git_object_lookup(&obj, repo, git_reference_target(resolved), GIT_OBJ_ANY);
git_reference_free(resolved);
}
}
diff --git a/examples/general.c b/examples/general.c
index 9ccb4c5..70152d7 100644
--- a/examples/general.c
+++ b/examples/general.c
@@ -405,12 +405,12 @@ int main (int argc, char** argv)
switch (git_reference_type(ref)) {
case GIT_REF_OID:
- git_oid_fmt(out, git_reference_oid(ref));
+ git_oid_fmt(out, git_reference_target(ref));
printf("%s [%s]\n", refname, out);
break;
case GIT_REF_SYMBOLIC:
- printf("%s => %s\n", refname, git_reference_target(ref));
+ printf("%s => %s\n", refname, git_reference_symbolic_target(ref));
break;
default:
fprintf(stderr, "Unexpected reference type\n");