summaryrefslogtreecommitdiff
path: root/builtin-count-objects.c
diff options
context:
space:
mode:
Diffstat (limited to 'builtin-count-objects.c')
-rw-r--r--builtin-count-objects.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/builtin-count-objects.c b/builtin-count-objects.c
index ab35b65b07..62fd1f0961 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;