diff options
author | Junio C Hamano <gitster@pobox.com> | 2012-05-10 10:33:05 -0700 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2012-05-10 10:33:05 -0700 |
commit | db8d6646786a9aa3242dc9eafbcef2e9f77ba7ab (patch) | |
tree | 17a6a3a49f7b4fd5678b8f382747880ce49d0a20 /config.c | |
parent | Merge branch 'cc/fix-missing-va-end-in-revert' into maint (diff) | |
parent | config: expand tildes in include.path variable (diff) | |
download | tgif-db8d6646786a9aa3242dc9eafbcef2e9f77ba7ab.tar.xz |
Merge branch 'mm/include-userpath' into maint
By Jeff King
* mm/include-userpath:
config: expand tildes in include.path variable
Diffstat (limited to 'config.c')
-rw-r--r-- | config.c | 6 |
1 files changed, 6 insertions, 0 deletions
@@ -37,6 +37,11 @@ static int handle_path_include(const char *path, struct config_include_data *inc { int ret = 0; struct strbuf buf = STRBUF_INIT; + char *expanded = expand_user_path(path); + + if (!expanded) + return error("Could not expand include path '%s'", path); + path = expanded; /* * Use an absolute path as-is, but interpret relative paths @@ -63,6 +68,7 @@ static int handle_path_include(const char *path, struct config_include_data *inc inc->depth--; } strbuf_release(&buf); + free(expanded); return ret; } |