Fix builtin checkout crashing when given an invalid path
Signed-off-by: Alex Riesen <raa.lkml@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:
parent
25c4f61c51
commit
301e42edc3
@ -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) {
|
||||
|
Loading…
Reference in New Issue
Block a user