diff options
Diffstat (limited to 'examples/checkout.c')
| -rw-r--r-- | examples/checkout.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/examples/checkout.c b/examples/checkout.c index f92ad7399..9119d6503 100644 --- a/examples/checkout.c +++ b/examples/checkout.c @@ -132,7 +132,7 @@ static int perform_checkout_ref(git_repository *repo, git_annotated_commit *targ /** Grab the commit we're interested to move to */ err = git_commit_lookup(&target_commit, repo, git_annotated_commit_id(target)); if (err != 0) { - fprintf(stderr, "failed to lookup commit: %s\n", giterr_last()->message); + fprintf(stderr, "failed to lookup commit: %s\n", git_error_last()->message); goto cleanup; } @@ -140,12 +140,12 @@ static int perform_checkout_ref(git_repository *repo, git_annotated_commit *targ * Perform the checkout so the workdir corresponds to what target_commit * contains. * - * Note that it's okay to pass a git_commit here, because it will be + * Note that it's okay to pass a git_commit here, because it will be * peeled to a tree. */ err = git_checkout_tree(repo, (const git_object *)target_commit, &checkout_opts); if (err != 0) { - fprintf(stderr, "failed to checkout tree: %s\n", giterr_last()->message); + fprintf(stderr, "failed to checkout tree: %s\n", git_error_last()->message); goto cleanup; } @@ -161,7 +161,7 @@ static int perform_checkout_ref(git_repository *repo, git_annotated_commit *targ err = git_repository_set_head_detached_from_annotated(repo, target); } if (err != 0) { - fprintf(stderr, "failed to update HEAD reference: %s\n", giterr_last()->message); + fprintf(stderr, "failed to update HEAD reference: %s\n", git_error_last()->message); goto cleanup; } @@ -219,7 +219,7 @@ int main(int argc, char **argv) */ err = resolve_refish(&checkout_target, repo, args.argv[args.pos]); if (err != 0) { - fprintf(stderr, "failed to resolve %s: %s\n", args.argv[args.pos], giterr_last()->message); + fprintf(stderr, "failed to resolve %s: %s\n", args.argv[args.pos], git_error_last()->message); goto cleanup; } err = perform_checkout_ref(repo, checkout_target, &opts); |
