aboutsummaryrefslogtreecommitdiff
path: root/builtin-merge.c
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2008-08-20 22:07:55 -0700
committerJunio C Hamano <gitster@pobox.com>2008-08-20 22:57:55 -0700
commit131f9a108bba5a8b0bcba072696653ab3199911a (patch)
tree03d21803780a8271a546fa3d64a8345bb9ff1da0 /builtin-merge.c
parent13613eac5bf886b37cc583462999419f91c98a17 (diff)
downloadgit-131f9a108bba5a8b0bcba072696653ab3199911a.tar.gz
git-131f9a108bba5a8b0bcba072696653ab3199911a.tar.xz
Fix "git-merge -s bogo" help text
It does not make much sense to reuse the output code from "git help" to show the list of commands to the standard output while giving the error message before that to the standard error stream. This makes the output consistent to that of the 1.6.0 version of "git merge". Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'builtin-merge.c')
-rw-r--r--builtin-merge.c14
1 files changed, 11 insertions, 3 deletions
diff --git a/builtin-merge.c b/builtin-merge.c
index 1f9389bfd..3e8db0d38 100644
--- a/builtin-merge.c
+++ b/builtin-merge.c
@@ -110,9 +110,17 @@ static struct strategy *get_strategy(const char *name)
}
}
if (!is_in_cmdlist(&main_cmds, name) && !is_in_cmdlist(&other_cmds, name)) {
-
- fprintf(stderr, "Could not find merge strategy '%s'.\n\n", name);
- list_commands("strategies", longest, &main_cmds, &other_cmds);
+ fprintf(stderr, "Could not find merge strategy '%s'.\n", name);
+ fprintf(stderr, "Available strategies are:");
+ for (i = 0; i < main_cmds.cnt; i++)
+ fprintf(stderr, " %s", main_cmds.names[i]->name);
+ fprintf(stderr, ".\n");
+ if (other_cmds.cnt) {
+ fprintf(stderr, "Available custom strategies are:");
+ for (i = 0; i < other_cmds.cnt; i++)
+ fprintf(stderr, " %s", other_cmds.names[i]->name);
+ fprintf(stderr, ".\n");
+ }
exit(1);
}