]> asedeno.scripts.mit.edu Git - git.git/blobdiff - dir.c
Merge branch 'master' of git://repo.or.cz/git/fastimport
[git.git] / dir.c
diff --git a/dir.c b/dir.c
index 6564a929ff66cdffca0666e175c9361149b25b5e..d3063520b03c9c5f608cbd9e97f6b414adb4c5af 100644 (file)
--- a/dir.c
+++ b/dir.c
@@ -34,8 +34,9 @@ int common_prefix(const char **pathspec)
        prefix = slash - path + 1;
        while ((next = *++pathspec) != NULL) {
                int len = strlen(next);
-               if (len >= prefix && !memcmp(path, next, len))
+               if (len >= prefix && !memcmp(path, next, prefix))
                        continue;
+               len = prefix - 1;
                for (;;) {
                        if (!len)
                                return 0;