Commit Diff
- Commit:
012b711c71ba806caed108beb296ac2161deda35
- From:
- Christian Weisgerber <naddy@mips.inka.de>
- Via:
- Thomas Adam <thomas@xteddy.org>
- Date:
- Message:
- got_worktree_open: do not skip a locked worktree When trying to open a worktree from a list of metadata directories (.got, .cvg), error out when a worktree is found but is already locked. Skipping it and proceeding would result in a confusing "no git repository found" error from tog and gotadmin. ok stsp
- Actions:
- Patch | Tree
--- 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