diff options
-rw-r--r-- | builtin-checkout.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/builtin-checkout.c b/builtin-checkout.c index 4a4bb8b77d..9579ff4ab1 100644 --- 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) { |