contrib/git-svn: fix svn compat and fetch args
[git.git] / ls-files.c
index c533059..df25c8c 100644 (file)
@@ -279,8 +279,11 @@ static void read_directory(const char *path, const char *base, int baselen)
                                continue;
                        len = strlen(de->d_name);
                        memcpy(fullname + baselen, de->d_name, len+1);
-                       if (excluded(fullname) != show_ignored)
-                               continue;
+                       if (excluded(fullname) != show_ignored) {
+                               if (!show_ignored || DTYPE(de) != DT_DIR) {
+                                       continue;
+                               }
+                       }
 
                        switch (DTYPE(de)) {
                        struct stat st;
@@ -778,6 +781,7 @@ int main(int argc, const char **argv)
                                continue;
                        error("pathspec '%s' did not match any.",
                              pathspec[num] + prefix_offset);
+                       errors++;
                }
                return errors ? 1 : 0;
        }