mirror of
https://github.com/libgit2/libgit2.git
synced 2026-01-25 02:56:17 +00:00
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.
This commit is contained in:
@@ -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
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user