diff options
-rw-r--r-- | builtin-merge.c | 14 |
1 files changed, 11 insertions, 3 deletions
diff --git a/builtin-merge.c b/builtin-merge.c index 1f9389bfd7..3e8db0d383 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); } |