projects
/
git.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
[PATCH] Add -O<orderfile> option to diff-* brothers.
[git.git]
/
ls-files.c
diff --git
a/ls-files.c
b/ls-files.c
index
76782f6
..
c6c32d9
100644
(file)
--- a/
ls-files.c
+++ b/
ls-files.c
@@
-136,7
+136,10
@@
static void read_directory(const char *path, const char *base, int baselen)
while ((de = readdir(dir)) != NULL) {
int len;
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;
continue;
if (excluded(de->d_name) != show_ignored)
continue;
@@
-179,7
+182,7
@@
static int cmp_name(const void *p1, const void *p2)
e2->name, e2->len);
}
e2->name, e2->len);
}
-static void show_killed_files()
+static void show_killed_files(
void
)
{
int i;
for (i = 0; i < nr_dir; i++) {
{
int i;
for (i = 0; i < nr_dir; i++) {
@@
-259,7
+262,7
@@
static void show_files(void)
tag_cached,
ce->name, line_terminator);
else
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),
ce_stage(ce) ? tag_unmerged :
tag_cached,
ntohl(ce->ce_mode),
@@
-283,7
+286,7
@@
static void show_files(void)
}
static const char *ls_files_usage =
}
static const char *ls_files_usage =
- "ls-files [-z] [-t] (--[cached|deleted|others|stage|unmerged|killed])* "
+ "
git-
ls-files [-z] [-t] (--[cached|deleted|others|stage|unmerged|killed])* "
"[ --ignored [--exclude=<pattern>] [--exclude-from=<file>) ]";
int main(int argc, char **argv)
"[ --ignored [--exclude=<pattern>] [--exclude-from=<file>) ]";
int main(int argc, char **argv)