summaryrefslogtreecommitdiff
path: root/builtin/worktree.c
diff options
context:
space:
mode:
Diffstat (limited to 'builtin/worktree.c')
-rw-r--r--builtin/worktree.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/builtin/worktree.c b/builtin/worktree.c
index 99abaeec6c..ce56fdaaa9 100644
--- a/builtin/worktree.c
+++ b/builtin/worktree.c
@@ -676,8 +676,11 @@ static void show_worktree(struct worktree *wt, int path_maxlen, int abbrev_len)
} else
strbuf_addstr(&sb, "(error)");
}
- printf("%s\n", sb.buf);
+ if (!is_main_worktree(wt) && worktree_lock_reason(wt))
+ strbuf_addstr(&sb, " locked");
+
+ printf("%s\n", sb.buf);
strbuf_release(&sb);
}