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: Rene Scharfe <l.s.r@web.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>

René Scharfe committed Aug 30, 2014 at 18:07 UTC 37007c3a87f3d78f533533f96a0d49bd0d520671
1 file changed +1 -5
config.c
+1 -5
@@ -127,7 +127,6 @@ static int handle_path_include(const char *path, struct config_include_data *inc
127 int git_config_include(const char *var, const char *value, void *data)
128 {
129 struct config_include_data *inc = data;
130 - const char *type;
130 int ret;
131
132 /*
@@ -138,10 +137,7 @@ int git_config_include(const char *var, const char *value, void *data)
137 if (ret < 0)
138 return ret;
139
141 - if (!skip_prefix(var, "include.", &type))
142 - return ret;
143 -
144 - if (!strcmp(type, "path"))
140 + if (!strcmp(var, "include.path"))
141 ret = handle_path_include(value, inc);
142 return ret;
143 }