summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 15e593e)
raw | patch | inline | side by side (parent: 15e593e)
author | Ramsay Allan Jones <ramsay@ramsay1.demon.co.uk> | |
Thu, 3 Aug 2006 15:48:41 +0000 (16:48 +0100) | ||
committer | Junio C Hamano <junkio@cox.net> | |
Fri, 4 Aug 2006 04:44:13 +0000 (21:44 -0700) |
The only change in behaviour should be having a "usage: " prefix
on the output string rather than "fatal: ", and an exit code of
129 rather than 128.
Signed-off-by: Ramsay Allan Jones <ramsay@ramsay1.demon.co.uk>
Signed-off-by: Junio C Hamano <junkio@cox.net>
on the output string rather than "fatal: ", and an exit code of
129 rather than 128.
Signed-off-by: Ramsay Allan Jones <ramsay@ramsay1.demon.co.uk>
Signed-off-by: Junio C Hamano <junkio@cox.net>
builtin-add.c | patch | blob | history | |
builtin-init-db.c | patch | blob | history | |
builtin-rm.c | patch | blob | history | |
builtin-write-tree.c | patch | blob | history | |
hash-object.c | patch | blob | history |
diff --git a/builtin-add.c b/builtin-add.c
index f548b8007de79d66f7ed3fad0d96bce75c6bbf57..096b611b5b0eef1c5a96dcaddc21aa874bdaee29 100644 (file)
--- a/builtin-add.c
+++ b/builtin-add.c
verbose = 1;
continue;
}
- die(builtin_add_usage);
+ usage(builtin_add_usage);
}
pathspec = get_pathspec(prefix, argv + i);
diff --git a/builtin-init-db.c b/builtin-init-db.c
index 52473edf569e4d318a74548acefaf4023f37c87c..5085018e46d8ebefaf797d62dcc7c9f8f1d06d02 100644 (file)
--- a/builtin-init-db.c
+++ b/builtin-init-db.c
else if (!strncmp(arg, "--shared=", 9))
shared_repository = git_config_perm("arg", arg+9);
else
- die(init_db_usage);
+ usage(init_db_usage);
}
/*
diff --git a/builtin-rm.c b/builtin-rm.c
index 92d205a7153a7cc5267ea9cf774bc1e4fac887d4..a0882bf1b045c1db91511e5e7c156a3198eb4c82 100644 (file)
--- a/builtin-rm.c
+++ b/builtin-rm.c
force = 1;
continue;
}
- die(builtin_rm_usage);
+ usage(builtin_rm_usage);
}
if (argc <= i)
usage(builtin_rm_usage);
diff --git a/builtin-write-tree.c b/builtin-write-tree.c
index 0289f59936267194ccbb8276a525ad24198a5de9..6b62d7dc8c8b17bd0ff6b639a9bab18400d2177d 100644 (file)
--- a/builtin-write-tree.c
+++ b/builtin-write-tree.c
else if (!strncmp(arg, "--prefix=", 9))
prefix = arg + 9;
else
- die(write_tree_usage);
+ usage(write_tree_usage);
argc--; argv++;
}
diff --git a/hash-object.c b/hash-object.c
index 43bd93bffb3f5e0b7b19a62865347a421d6a56a3..5f89e64c13d6f13fd832309041a6a9fa9d0bca5c 100644 (file)
--- a/hash-object.c
+++ b/hash-object.c
if (!no_more_flags && argv[i][0] == '-') {
if (!strcmp(argv[i], "-t")) {
if (argc <= ++i)
- die(hash_object_usage);
+ usage(hash_object_usage);
type = argv[i];
}
else if (!strcmp(argv[i], "-w")) {
hash_stdin(type, write_object);
}
else
- die(hash_object_usage);
- }
+ usage(hash_object_usage);
+ }
else {
const char *arg = argv[i];
if (0 <= prefix_length)