Handle invalid argc gently
describe, git: Handle argc==0 case the same way as argc==1. merge-tree: Refuse excessive arguments. Signed-off-by: Dmitry V. Levin <ldv@altlinux.org> Signed-off-by: Junio C Hamano <junkio@cox.net>
This commit is contained in:

committed by
Junio C Hamano

parent
7977f0ea53
commit
5b6df8e45f
@ -337,7 +337,7 @@ int main(int argc, char **argv)
|
||||
struct tree_desc t[3];
|
||||
void *buf1, *buf2, *buf3;
|
||||
|
||||
if (argc < 4)
|
||||
if (argc != 4)
|
||||
usage(merge_tree_usage);
|
||||
|
||||
setup_git_directory();
|
||||
|
Reference in New Issue
Block a user