Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.kernel.org/pub/scm/git/git.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJunio C Hamano <junkio@cox.net>2005-12-06 09:29:36 +0300
committerJunio C Hamano <junkio@cox.net>2005-12-06 09:29:36 +0300
commit4a62eaed317e260b0bdb0ce5f340757d2a6dfef1 (patch)
treee075da548b5da63088e1d562ac1742accedab2e5
parent9c2e7c0ca240e1508871cd22f2ee380f52d69a53 (diff)
init-db: check extra arguments and complain.
"git-init-db junk" does not complain but just ignores "junk". Die with the usage string in such a case. Signed-off-by: Junio C Hamano <junkio@cox.net>
-rw-r--r--init-db.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/init-db.c b/init-db.c
index 8195b6842e..ead37b5ed8 100644
--- a/init-db.c
+++ b/init-db.c
@@ -237,9 +237,7 @@ int main(int argc, char **argv)
for (i = 1; i < argc; i++, argv++) {
char *arg = argv[1];
- if (arg[0] != '-')
- break;
- else if (!strncmp(arg, "--template=", 11))
+ if (!strncmp(arg, "--template=", 11))
template_dir = arg+11;
else
die(init_db_usage);