Re: [PATCH] On error, do not list all commands, but point to --help option

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Jari Aalto <jari.aalto@xxxxxxxxx> 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.
-
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux