summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 916e137)
raw | patch | inline | side by side (parent: 916e137)
author | Stephen Boyd <bebarino@gmail.com> | |
Fri, 26 Jun 2009 05:14:09 +0000 (22:14 -0700) | ||
committer | Junio C Hamano <gitster@pobox.com> | |
Sat, 27 Jun 2009 21:11:28 +0000 (14:11 -0700) |
Printing the usage message when encountering bad option combinations is
not very helpful. Instead, die with a message which tells the user
exactly what combination is invalid.
Signed-off-by: Stephen Boyd <bebarino@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
not very helpful. Instead, die with a message which tells the user
exactly what combination is invalid.
Signed-off-by: Stephen Boyd <bebarino@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
builtin-read-tree.c | patch | blob | history |
diff --git a/builtin-read-tree.c b/builtin-read-tree.c
index 82e25eaa0758d8b9584592f4072f81eeccb0bf1d..17c96310ab66987dd02ef118d8f43d8d45923d01 100644 (file)
--- a/builtin-read-tree.c
+++ b/builtin-read-tree.c
continue;
}
- /* using -u and -i at the same time makes no sense */
if (1 < opts.index_only + opts.update)
- usage(read_tree_usage);
+ die("-u and -i at the same time makes no sense");
if (get_sha1(arg, sha1))
die("Not a valid object name %s", arg);
stage++;
}
if ((opts.update||opts.index_only) && !opts.merge)
- usage(read_tree_usage);
+ die("%s is meaningless without -m, --reset, or --prefix",
+ opts.update ? "-u" : "-i");
if ((opts.dir && !opts.update))
die("--exclude-per-directory is meaningless unless -u");
if (opts.merge && !opts.index_only)