{"thread":{"id":"37455","subject":"[PATCH] config: simplify git_config_include()","startedAt":"2014-08-30T16:07:05Z","lastAt":"2014-08-30T16:07:05Z","messageCount":1,"participants":["René Scharfe"],"isPatch":true,"patchVersion":1,"patchTotal":null},"messages":[{"id":"248654","messageId":"5401F6A9.2000104@web.de","threadId":"37455","inReplyTo":null,"subject":"[PATCH] config: simplify git_config_include()","fromName":"René Scharfe","fromEmail":"l.s.r@web.de","sentAt":"2014-08-30T16:07:05Z","receivedAt":"2014-08-30T16:07:05Z","isPatch":true,"sender":{"key":"l.s.r@web.de","avatar":"https://avatars.githubusercontent.com/u/26122331?v=4"},"body":"Instead of using skip_prefix() to check the first part of the string\nand then strcmp() to check the rest, simply use strcmp() to check the\nwhole string.\n\nSigned-off-by: Rene Scharfe <l.s.r@web.de>\n---\n config.c | 6 +-----\n 1 file changed, 1 insertion(+), 5 deletions(-)\n\ndiff --git a/config.c b/config.c\nindex 058505c..c558a21 100644\n--- a/config.c\n+++ b/config.c\n@@ -127,7 +127,6 @@ static int handle_path_include(const char *path, struct config_include_data *inc\n int git_config_include(const char *var, const char *value, void *data)\n {\n \tstruct config_include_data *inc = data;\n-\tconst char *type;\n \tint ret;\n \n \t/*\n@@ -138,10 +137,7 @@ int git_config_include(const char *var, const char *value, void *data)\n \tif (ret < 0)\n \t\treturn ret;\n \n-\tif (!skip_prefix(var, \"include.\", &type))\n-\t\treturn ret;\n-\n-\tif (!strcmp(type, \"path\"))\n+\tif (!strcmp(var, \"include.path\"))\n \t\tret = handle_path_include(value, inc);\n \treturn ret;\n }\n-- \n2.1.0\n"}]}