Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.kernel.org/pub/scm/git/git.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohannes Sixt <j6t@kdbg.org>2009-04-23 17:49:06 +0400
committerJunio C Hamano <gitster@pobox.com>2009-04-24 12:29:13 +0400
commit178b513eb78ac8099588c5bed1f1f74f660cf009 (patch)
treeb4f9cf9803ced33944d10620ca49bf7ab3ad0c9b /builtin-help.c
parent677fbff88f368ed6ac52438ddbb530166ec1d5d1 (diff)
builtin-help: silently tolerate unknown keys
If for some reason the config file contains a key without a subkey like [man] foo = bar then even a plain git help produces an error message. With this patch such an entry is ignored. Additionally, the warning about unknown sub-keys is removed. It could become annoying if new sub-keys are introduced in the future, and then the configuration is read by an old version of git that does not know about it. Signed-off-by: Johannes Sixt <j6t@kdbg.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'builtin-help.c')
-rw-r--r--builtin-help.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/builtin-help.c b/builtin-help.c
index 9b57a74618..e7fbe9af63 100644
--- a/builtin-help.c
+++ b/builtin-help.c
@@ -236,7 +236,7 @@ static int add_man_viewer_info(const char *var, const char *value)
const char *subkey = strrchr(name, '.');
if (!subkey)
- return error("Config with no key for man viewer: %s", name);
+ return 0;
if (!strcmp(subkey, ".path")) {
if (!value)
@@ -249,7 +249,6 @@ static int add_man_viewer_info(const char *var, const char *value)
return add_man_viewer_cmd(name, subkey - name, value);
}
- warning("'%s': unsupported man viewer sub key.", subkey);
return 0;
}