Clean up commit insertion in git-rev-list
[gitweb.git] / ls-files.c
index 3b93d5e7cc7f7dd4ebed13a5cc1a4ad976fc94d8..c6c32d94b0755550a97544708ce71885c02a4b68 100644 (file)
@@ -136,7 +136,10 @@ static void read_directory(const char *path, const char *base, int baselen)
                while ((de = readdir(dir)) != NULL) {
                        int len;
 
-                       if (de->d_name[0] == '.')
+                       if ((de->d_name[0] == '.') &&
+                           (de->d_name[1] == 0 ||
+                            !strcmp(de->d_name + 1, ".") ||
+                            !strcmp(de->d_name + 1, "git")))
                                continue;
                        if (excluded(de->d_name) != show_ignored)
                                continue;
@@ -259,7 +262,7 @@ static void show_files(void)
                                       tag_cached,
                                       ce->name, line_terminator);
                        else
-                               printf("%s%06o %s %d %s%c",
+                               printf("%s%06o %s %d\t%s%c",
                                       ce_stage(ce) ? tag_unmerged :
                                       tag_cached,
                                       ntohl(ce->ce_mode),