config: don't implicitly use gitdir or commondir
[gitweb.git] / pathspec.c
index 69ef86b85a7735df428b8cab9f9cce477a4fcd89..e4659b1440c94d0f65ef486a488b604d6195d81c 100644 (file)
@@ -1,4 +1,5 @@
 #include "cache.h"
+#include "config.h"
 #include "dir.h"
 #include "pathspec.h"
 #include "attr.h"
@@ -505,7 +506,7 @@ static void init_pathspec_item(struct pathspec_item *item, unsigned flags,
         * original. Useful for passing to another command.
         */
        if ((flags & PATHSPEC_PREFIX_ORIGIN) &&
-           prefixlen && !get_literal_global()) {
+           !get_literal_global()) {
                struct strbuf sb = STRBUF_INIT;
 
                /* Preserve the actual prefix length of each pattern */