X-Git-Url: https://git.tokkee.org/?a=blobdiff_plain;f=builtin-count-objects.c;h=62fd1f0961a29cc81032d20b3fe37fcc91293407;hb=22ba47f544a233958c73a9260b18c57b431f44b3;hp=ab35b65b073e9bc089fcc96f295ca3bc457c992a;hpb=3fdd37fe1520765d1d207737ab65415e3d2ca174;p=git.git diff --git a/builtin-count-objects.c b/builtin-count-objects.c index ab35b65b0..62fd1f096 100644 --- a/builtin-count-objects.c +++ b/builtin-count-objects.c @@ -5,6 +5,7 @@ */ #include "cache.h" +#include "dir.h" #include "builtin.h" #include "parse-options.h" @@ -21,9 +22,7 @@ static void count_objects(DIR *d, char *path, int len, int verbose, const char *cp; int bad = 0; - if ((ent->d_name[0] == '.') && - (ent->d_name[1] == 0 || - ((ent->d_name[1] == '.') && (ent->d_name[2] == 0)))) + if (is_dot_or_dotdot(ent->d_name)) continue; for (cp = ent->d_name; *cp; cp++) { int ch = *cp;