提交 37007c3a 编写于 作者: R René Scharfe 提交者: Junio C Hamano

config: simplify git_config_include()

Instead of using skip_prefix() to check the first part of the string
and then strcmp() to check the rest, simply use strcmp() to check the
whole string.
Signed-off-by: NRene Scharfe <l.s.r@web.de>
Signed-off-by: NJunio C Hamano <gitster@pobox.com>
上级 96db324a
......@@ -127,7 +127,6 @@ static int handle_path_include(const char *path, struct config_include_data *inc
int git_config_include(const char *var, const char *value, void *data)
{
struct config_include_data *inc = data;
const char *type;
int ret;
/*
......@@ -138,10 +137,7 @@ int git_config_include(const char *var, const char *value, void *data)
if (ret < 0)
return ret;
if (!skip_prefix(var, "include.", &type))
return ret;
if (!strcmp(type, "path"))
if (!strcmp(var, "include.path"))
ret = handle_path_include(value, inc);
return ret;
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册