archive-tar: turn write_tar_entry into blob-writing only
[gitweb.git] / config.c
index 68d32940f3f8f1512fa36702beb98c2457ca5d46..2bbf02d1e8c2c05f9fba1149c307c1b3b06517fd 100644 (file)
--- a/config.c
+++ b/config.c
@@ -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;
 }