git-add: error out when given no arguments.
Signed-off-by: Junio C Hamano <junkio@cox.net>
This commit is contained in:
parent
54851157ac
commit
93b0d86aaf
@ -111,6 +111,11 @@ int cmd_add(int argc, const char **argv, const char *prefix)
|
|||||||
}
|
}
|
||||||
usage(builtin_add_usage);
|
usage(builtin_add_usage);
|
||||||
}
|
}
|
||||||
|
if (argc <= i) {
|
||||||
|
fprintf(stderr, "Nothing specified, nothing added.\n");
|
||||||
|
fprintf(stderr, "Maybe you wanted to say 'git add .'?\n");
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
pathspec = get_pathspec(prefix, argv + i);
|
pathspec = get_pathspec(prefix, argv + i);
|
||||||
|
|
||||||
fill_directory(&dir, pathspec);
|
fill_directory(&dir, pathspec);
|
||||||
|
Loading…
Reference in New Issue
Block a user