Skip to content

Commit ac17154

Browse files
authored
Merge pull request libgit2#5184 from novalis/fix-example
Fix example checkout to forbid rather than require --
2 parents 8f7fd98 + ed387d4 commit ac17154

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

examples/checkout.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -195,7 +195,7 @@ int lg2_checkout(git_repository *repo, int argc, char **argv)
195195
fprintf(stderr, "unhandled\n");
196196
err = -1;
197197
goto cleanup;
198-
} else if (strcmp("--", args.argv[args.pos])) {
198+
} else if (!strcmp("--", args.argv[args.pos])) {
199199
/**
200200
* Try to checkout the given path
201201
*/

0 commit comments

Comments
 (0)