From: Junio C Hamano <gitster@pobox.com>
To: "Miklos Vajna" <vmiklos@frugalware.org>
Cc: "Mikael Magnusson" <mikachu@gmail.com>,
"Nguyen Thai Ngoc Duy" <pclouds@gmail.com>,
"Johannes Sixt" <j.sixt@viscovery.net>,
"Git Mailing List" <git@vger.kernel.org>,
"Johannes Schindelin" <Johannes.Schindelin@gmx.de>
Subject: Re: [PATCH] bash-completion: fix getting strategy list
Date: Wed, 20 Aug 2008 22:07:55 -0700 [thread overview]
Message-ID: <7v7iabklas.fsf@gitster.siamese.dyndns.org> (raw)
In-Reply-To: <7vbpznkmbf.fsf@gitster.siamese.dyndns.org> (Junio C. Hamano's message of "Wed, 20 Aug 2008 21:45:56 -0700")
Junio C Hamano <gitster@pobox.com> writes:
> "Mikael Magnusson" <mikachu@gmail.com> writes:
>
>> I don't know if i somehow have some weird patch merged in, i tried to check
>> and didn't find anything, at least. But when i run git merge -s help i get:
>
> Yes, there are some weird patch in 'next'. Miklos, could you fix the
> output format of that thing?
I do not think the code in 'next' that reuses the "help" thing to show
only the list to stdout while still giving the error message to stderr
makes any sense.
Let's do this.
---
builtin-merge.c | 14 +++++++++++---
1 files changed, 11 insertions(+), 3 deletions(-)
diff --git c/builtin-merge.c w/builtin-merge.c
index 1f9389b..3e8db0d 100644
--- c/builtin-merge.c
+++ w/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);
}
next prev parent reply other threads:[~2008-08-21 5:09 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-08-19 12:27 [BUG] git completion do sed on binary file Nguyen Thai Ngoc Duy
2008-08-19 13:28 ` [PATCH] bash-completion: fix getting strategy list Nguyen Thai Ngoc Duy
2008-08-19 13:35 ` Matthieu Moy
2008-08-19 13:46 ` Nguyen Thai Ngoc Duy
2008-08-19 14:18 ` Shawn O. Pearce
2008-08-19 14:50 ` Johannes Sixt
2008-08-19 14:57 ` Johannes Sixt
2008-08-20 16:58 ` Nguyen Thai Ngoc Duy
2008-08-20 18:22 ` Junio C Hamano
2008-08-20 21:13 ` Junio C Hamano
2008-08-20 22:39 ` Miklos Vajna
2008-08-21 0:43 ` Nguyen Thai Ngoc Duy
2008-08-21 2:14 ` Mikael Magnusson
2008-08-21 4:45 ` Junio C Hamano
2008-08-21 5:07 ` Junio C Hamano [this message]
2008-08-21 14:06 ` Miklos Vajna
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=7v7iabklas.fsf@gitster.siamese.dyndns.org \
--to=gitster@pobox.com \
--cc=Johannes.Schindelin@gmx.de \
--cc=git@vger.kernel.org \
--cc=j.sixt@viscovery.net \
--cc=mikachu@gmail.com \
--cc=pclouds@gmail.com \
--cc=vmiklos@frugalware.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).