From: "Shawn O. Pearce" <spearce@spearce.org>
To: Jari Aalto <jari.aalto@cante.net>
Cc: git@vger.kernel.org
Subject: Re: [PATCH] On error, do not list all commands, but point to --help option
Date: Sat, 20 Oct 2007 23:33:18 -0400 [thread overview]
Message-ID: <20071021033318.GD14735@spearce.org> (raw)
In-Reply-To: <ir51if2y.fsf@blue.sea.net>
Jari Aalto <jari.aalto@cante.net> wrote:
> - Remove out call to list_common_cmds_help()
Even if the list is against this change (which I'm in favor of)...
> - Send error message to stderr, not stdout.
I really think this really should be done. CVS and SVN both print
to stderr in this case, as does any other program I can think of
that takes subcommands. Its just the right thing to do.
> @@ -185,8 +185,7 @@ static void show_man_page(const char *git_cmd)
>
> void help_unknown_cmd(const char *cmd)
> {
> - printf("git: '%s' is not a git-command\n\n", cmd);
> - list_common_cmds_help();
> + fprintf(stderr, "git: '%s' is not a git-command. See --help\n\n", cmd);
Why are you still printing two LFs here? We have no additional
text to display after this error message, we probably only need
the one LF.
--
Shawn.
next prev parent reply other threads:[~2007-10-21 3:33 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-10-20 8:24 [PATCH] On error, do not list all commands, but point to --help option Jari Aalto
2007-10-20 20:28 ` Johannes Schindelin
2007-10-20 22:28 ` Jari Aalto
2007-10-20 23:02 ` Johannes Schindelin
2007-10-21 2:06 ` Shawn O. Pearce
2007-10-21 3:24 ` Jeff King
2007-10-21 3:29 ` Shawn O. Pearce
2007-10-21 6:33 ` Yin Ping
2007-10-21 8:58 ` Wincent Colaiuta
2007-10-21 12:42 ` Andreas Ericsson
2007-10-21 13:13 ` Jan Hudec
2007-10-21 14:17 ` Andreas Ericsson
2007-10-24 0:28 ` Salikh Zakirov
2007-10-20 22:41 ` Jari Aalto
2007-10-21 3:33 ` Shawn O. Pearce [this message]
2007-10-21 10:09 ` Jan Hudec
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=20071021033318.GD14735@spearce.org \
--to=spearce@spearce.org \
--cc=git@vger.kernel.org \
--cc=jari.aalto@cante.net \
/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).