Commit Diff


commit - 11024cb9b69a71de22ae46ccddcb4ef3b6730553
commit + 012b711c71ba806caed108beb296ac2161deda35
blob - 5e907496b89f49a5b541e0d5556b7bff8d65f838
blob + 5ca8baf35beb64bc05c5d0a9686bfc5324e0258f
--- lib/worktree_open.c
+++ lib/worktree_open.c
@@ -285,7 +285,8 @@ got_worktree_open(struct got_worktree **worktree, cons
 			for (i = 0; i < nitems(meta_dirs); i++) {
 				err = open_worktree(worktree, worktree_path,
 				    meta_dirs[i]);
-				if (err == NULL)
+				if (err == NULL ||
+				    err->code == GOT_ERR_WORKTREE_BUSY)
 					break;
 			}
 		} else