aboutsummaryrefslogtreecommitdiff
path: root/worktree.c
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2016-02-10 14:20:05 -0800
committerJunio C Hamano <gitster@pobox.com>2016-02-10 14:20:05 -0800
commitd0a1cbccab54d828be2d83acc73f38c162962966 (patch)
tree474f89e894ad4f8d6e47f5e27d1f08e102a4cd9f /worktree.c
parentff4ea6004fb48146330d663d64a71e7774f059f9 (diff)
parent618244e160cb0777bc8d41055f7de0192b10ea0f (diff)
downloadgit-d0a1cbccab54d828be2d83acc73f38c162962966.tar.xz
Merge branch 'nd/do-not-move-worktree-manually'
"git worktree" had a broken code that attempted to auto-fix possible inconsistency that results from end-users moving a worktree to different places without telling Git (the original repository needs to maintain backpointers to its worktrees, but "mv" run by end-users who are not familiar with that fact will obviously not adjust them), which actually made things worse when triggered. * nd/do-not-move-worktree-manually: worktree: stop supporting moving worktrees manually worktree.c: fix indentation
Diffstat (limited to 'worktree.c')
-rw-r--r--worktree.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/worktree.c b/worktree.c
index 981f810e80..6181a66f1e 100644
--- a/worktree.c
+++ b/worktree.c
@@ -176,10 +176,10 @@ struct worktree **get_worktrees(void)
if (!strcmp(d->d_name, ".") || !strcmp(d->d_name, ".."))
continue;
- if ((linked = get_linked_worktree(d->d_name))) {
- ALLOC_GROW(list, counter + 1, alloc);
- list[counter++] = linked;
- }
+ if ((linked = get_linked_worktree(d->d_name))) {
+ ALLOC_GROW(list, counter + 1, alloc);
+ list[counter++] = linked;
+ }
}
closedir(dir);
}