summaryrefslogtreecommitdiff
path: root/builtin
diff options
context:
space:
mode:
authorLibravatar Nguyễn Thái Ngọc Duy <pclouds@gmail.com>2016-05-22 16:33:54 +0700
committerLibravatar Junio C Hamano <gitster@pobox.com>2016-05-24 13:19:22 -0700
commitafb9e30b2cadfa010975b29e0ff7459d4b7ae953 (patch)
tree2c8fb46f5e4777de42ad8b7905cc41666d7d3c70 /builtin
parentgit-worktree.txt: keep subcommand listing in alphabetical order (diff)
downloadtgif-afb9e30b2cadfa010975b29e0ff7459d4b7ae953.tar.xz
worktree.c: use is_dot_or_dotdot()
Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com> Reviewed-by: Eric Sunshine <sunshine@sunshineco.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'builtin')
-rw-r--r--builtin/worktree.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/builtin/worktree.c b/builtin/worktree.c
index bf80111fd8..aaee0e2fe8 100644
--- a/builtin/worktree.c
+++ b/builtin/worktree.c
@@ -95,7 +95,7 @@ static void prune_worktrees(void)
if (!dir)
return;
while ((d = readdir(dir)) != NULL) {
- if (!strcmp(d->d_name, ".") || !strcmp(d->d_name, ".."))
+ if (is_dot_or_dotdot(d->d_name))
continue;
strbuf_reset(&reason);
if (!prune_worktree(d->d_name, &reason))