aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRamsay Allan Jones <ramsay@ramsay1.demon.co.uk>2006-08-03 16:48:41 +0100
committerJunio C Hamano <junkio@cox.net>2006-08-03 21:44:13 -0700
commit8cdf33643dc0b21d9ea922a3fdd7f64226c421aa (patch)
treec36d293c18ea9c254e68c639de46f612ba1134f6
parent15e593e4d37d1d350fef20ab666d58f6881c7f5f (diff)
downloadgit-8cdf33643dc0b21d9ea922a3fdd7f64226c421aa.tar.gz
git-8cdf33643dc0b21d9ea922a3fdd7f64226c421aa.tar.xz
Replace some calls to die(usage_str) with usage(usage_str).
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>
-rw-r--r--builtin-add.c2
-rw-r--r--builtin-init-db.c2
-rw-r--r--builtin-rm.c2
-rw-r--r--builtin-write-tree.c2
-rw-r--r--hash-object.c6
5 files changed, 7 insertions, 7 deletions
diff --git a/builtin-add.c b/builtin-add.c
index f548b8007..096b611b5 100644
--- a/builtin-add.c
+++ b/builtin-add.c
@@ -117,7 +117,7 @@ int cmd_add(int argc, const char **argv, const char *prefix)
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 52473edf5..5085018e4 100644
--- a/builtin-init-db.c
+++ b/builtin-init-db.c
@@ -267,7 +267,7 @@ int cmd_init_db(int argc, const char **argv, const char *prefix)
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 92d205a71..a0882bf1b 100644
--- a/builtin-rm.c
+++ b/builtin-rm.c
@@ -80,7 +80,7 @@ int cmd_rm(int argc, const char **argv, const char *prefix)
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 0289f5993..6b62d7dc8 100644
--- a/builtin-write-tree.c
+++ b/builtin-write-tree.c
@@ -73,7 +73,7 @@ int cmd_write_tree(int argc, const char **argv, const char *unused_prefix)
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 43bd93bff..5f89e64c1 100644
--- a/hash-object.c
+++ b/hash-object.c
@@ -46,7 +46,7 @@ int main(int argc, char **argv)
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")) {
@@ -66,8 +66,8 @@ int main(int argc, char **argv)
hash_stdin(type, write_object);
}
else
- die(hash_object_usage);
- }
+ usage(hash_object_usage);
+ }
else {
const char *arg = argv[i];
if (0 <= prefix_length)