Commit Diff
- Commit:
b277f9fb0e1d4e3dcf2b2848c198d5e213f29a06
- From:
- Christian Weisgerber <naddy@mips.inka.de>
- 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 @@ -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