Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.kernel.org/pub/scm/git/git.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'worktree.c')
-rw-r--r--worktree.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/worktree.c b/worktree.c
index fb3e286996..e00858540e 100644
--- a/worktree.c
+++ b/worktree.c
@@ -225,7 +225,8 @@ int is_main_worktree(const struct worktree *wt)
const char *worktree_lock_reason(struct worktree *wt)
{
- assert(!is_main_worktree(wt));
+ if (is_main_worktree(wt))
+ return NULL;
if (!wt->lock_reason_valid) {
struct strbuf path = STRBUF_INIT;