diff options
author | René Scharfe <l.s.r@web.de> | 2014-08-30 18:07:05 +0200 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2014-09-02 10:56:43 -0700 |
commit | 37007c3a87f3d78f533533f96a0d49bd0d520671 (patch) | |
tree | 17503f59e46837813e37eee0a8f88c008c47d7a3 /config.c | |
parent | 96db324a73fdada6fbe7b63221986f8f18cc63b0 (diff) | |
download | git-37007c3a87f3d78f533533f96a0d49bd0d520671.tar.gz |
config: simplify git_config_include()rs/simplify-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>
Diffstat (limited to 'config.c')
-rw-r--r-- | config.c | 6 |
1 files changed, 1 insertions, 5 deletions
@@ -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; } |