summaryrefslogtreecommitdiff
path: root/builtin-count-objects.c
diff options
context:
space:
mode:
authorLibravatar Junio C Hamano <gitster@pobox.com>2009-01-17 23:05:54 -0800
committerLibravatar Junio C Hamano <gitster@pobox.com>2009-01-17 23:05:54 -0800
commit6af384ce73ad880253be5be7587f19f6fe3afcba (patch)
treec63418b88b19af0eb7ca37adfffa49408e57bc79 /builtin-count-objects.c
parentMerge branch 'jc/maint-format-patch' (diff)
parentAllow cloning to an existing empty directory (diff)
downloadtgif-6af384ce73ad880253be5be7587f19f6fe3afcba.tar.xz
Merge branch 'ap/clone-into-empty'
* ap/clone-into-empty: Allow cloning to an existing empty directory add is_dot_or_dotdot inline function
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;