Andrew's git
/
gitweb.git
/ blobdiff
summary
|
log
|
commit
|
diff
|
tree
commit
grep
author
committer
pickaxe
?
re
tests: introduce test_must_fail
[gitweb.git]
/
builtin-checkout.c
diff --git
a/builtin-checkout.c
b/builtin-checkout.c
index 4a4bb8b77dc9251849a2ecf625a4efb9ce154fdb..9579ff4ab12dfc1c48d6e530a93d0d18e07c2ebb 100644
(file)
--- a/
builtin-checkout.c
+++ b/
builtin-checkout.c
@@
-545,6
+545,10
@@
int cmd_checkout(int argc, const char **argv, const char *prefix)
if (argc) {
const char **pathspec = get_pathspec(prefix, argv);
+
+ if (!pathspec)
+ die("invalid path specification");
+
/* Checkout paths */
if (opts.new_branch || opts.force || opts.merge) {
if (argc == 1) {