Commit Diff


commit - db82695e31945b3ce001a5fb69674c3638622368
commit + b277f9fb0e1d4e3dcf2b2848c198d5e213f29a06
blob - c3846b45dec95fcd923225f11b5f013d97fc39c0
blob + cbce00f57c0999cd56f639776fdc0be83f732cf9
--- lib/worktree_open.c
+++ lib/worktree_open.c
@@ -286,7 +286,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