X-Git-Url: https://git.tokkee.org/?a=blobdiff_plain;f=builtin-count-objects.c;h=62fd1f0961a29cc81032d20b3fe37fcc91293407;hb=1d4e4cd4a108dc105f6c8e739c69b9261d4e92a5;hp=ab35b65b073e9bc089fcc96f295ca3bc457c992a;hpb=ae5a97fdd0c553926aabdf324b6d9108b0699bee;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;