diff options
author | Dmitry V. Levin <ldv@altlinux.org> | 2006-09-14 05:04:09 +0400 |
---|---|---|
committer | Junio C Hamano <junkio@cox.net> | 2006-09-14 11:48:11 -0700 |
commit | 5b6df8e45f31c7eb26c30536448cffe1b715e1ce (patch) | |
tree | 07277e193c5db09b3f9715bdc6d0a9ff1d294821 /describe.c | |
parent | 7977f0ea53fad7103c83e5bd61777da27451f1d6 (diff) | |
download | git-5b6df8e45f31c7eb26c30536448cffe1b715e1ce.tar.gz |
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>
Diffstat (limited to 'describe.c')
-rw-r--r-- | describe.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/describe.c b/describe.c index 5ed052d3a1..ab192f83ae 100644 --- a/describe.c +++ b/describe.c @@ -163,7 +163,7 @@ int main(int argc, char **argv) setup_git_directory(); - if (i == argc) + if (argc <= i) describe("HEAD", 1); else while (i < argc) { |