Re: [PATCH] help: warn if specified 'man.viewer' is unsupported, instead of erroring out
- From
Junio C Hamano <gitster@pobox.com>
- Date
- Mar 13, 2008, 06:22 UTC
- Message-ID
- <7vzlt3ywha.fsf@gitster.siamese.dyndns.org>
- In-Reply-To
- <20080313071040.bbf5528b.chriscool@tuxfamily.org>
Christian Couder <chriscool@tuxfamily.org> writes:
Show 20 quoted lines
> Signed-off-by: Christian Couder <chriscool@tuxfamily.org>
> ---
> help.c | 2 +-
> 1 files changed, 1 insertions(+), 1 deletions(-)
>
> This was suggested by Xavier Maillard.
>
> diff --git a/help.c b/help.c
> index 5da8c9c..ecaca77 100644
> --- a/help.c
> +++ b/help.c
> @@ -139,7 +139,7 @@ static int add_man_viewer(const char *value)
> else if (!strcasecmp(value, "konqueror"))
> do_add_man_viewer(exec_man_konqueror);
> else
> - return error("'%s': unsupported man viewer.", value);
> + warning("'%s': unsupported man viewer.", value);
>
> return 0;
> }While I'd agree this is a good change, the author should justify it in the commit log message. I ask list regulars like you to set a good example for others.
When a document viewer that is unknown to the current version of git is specified in the .git/config file, instead of erroring out the process completely, just issue a warning. It might be that the user usually is using a newer git that supports it (and the configuration is written for that version) but is temporarily using an older git that does not know the viewer.