Commit ac171542a6d2e6ad39f2e778c4ca26604b187d04

Patrick Steinhardt 2019-08-01T17:45:14

Merge pull request #5184 from novalis/fix-example Fix example checkout to forbid rather than require --

1
2
3
4
5
6
7
8
9
10
11
12
13
diff --git a/examples/checkout.c b/examples/checkout.c
index 577a6f1..d552eec 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
 		 */