From ed387d4af62b0425d066db0944bb0686b8c57a74 Mon Sep 17 00:00:00 2001 From: David Turner Date: Wed, 24 Jul 2019 12:01:27 -0400 Subject: [PATCH] Fix example checkout to forbid rather than require -- Make the example program for checkout follow git syntax, where "--" indicates a file. This was likely just a strcmp return value confusion. --- examples/checkout.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/examples/checkout.c b/examples/checkout.c index 577a6f124..d552eece8 100644 --- a/examples/checkout.c +++ b/examples/checkout.c @@ -195,7 +195,7 @@ int lg2_checkout(git_repository *repo, int argc, char **argv) fprintf(stderr, "unhandled\n"); err = -1; goto cleanup; - } else if (strcmp("--", args.argv[args.pos])) { + } else if (!strcmp("--", args.argv[args.pos])) { /** * Try to checkout the given path */