From 451bb210f81c10b60bf90403c9183be26beaaabf Mon Sep 17 00:00:00 2001 From: Christian Couder Date: Mon, 2 Feb 2009 06:12:58 +0100 Subject: parse-options: add new function "usage_msg_opt" This function can be used instead of "usage_with_options" when you want to print an error message before the usage string. It may be useful because: if (condition) usage_msg_opt("condition is false", usage, opts); is shorter than: if (condition) { fprintf(stderr, "condition is false\n\n"); usage_with_options(usage, opts); } and may be more consistent. Signed-off-by: Christian Couder Signed-off-by: Junio C Hamano --- builtin-replace.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'builtin-replace.c') diff --git a/builtin-replace.c b/builtin-replace.c index e3767b9661..8220d6eb38 100644 --- a/builtin-replace.c +++ b/builtin-replace.c @@ -121,7 +121,7 @@ int cmd_replace(int argc, const char **argv, const char *prefix) OPT_END() }; - argc = parse_options(argc, argv, options, git_replace_usage, 0); + argc = parse_options(argc, argv, prefix, options, git_replace_usage, 0); if (list && delete) usage_with_options(git_replace_usage, options); -- cgit v1.2.1