From: Michael Rappazzo Date: Sat, 22 Aug 2015 21:51:34 GMT Subject: [PATCH v5 2/2] worktree: add 'list' command Message-ID: <1440280294-50679-3-git-send-email-rappazzo@gmail.com> In-Reply-To: <1440280294-50679-1-git-send-email-rappazzo@gmail.com> 'git worktree list' uses the for_each_worktree function to iterate, and outputs in the format: ' ()' Signed-off-by: Michael Rappazzo --- Documentation/git-worktree.txt | 11 +++++- builtin/worktree.c | 55 ++++++++++++++++++++++++++++ t/t2027-worktree-list.sh | 81 ++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 146 insertions(+), 1 deletion(-) create mode 100755 t/t2027-worktree-list.sh diff --git a/Documentation/git-worktree.txt b/Documentation/git-worktree.txt index fb68156..e953b4e 100644 --- a/Documentation/git-worktree.txt +++ b/Documentation/git-worktree.txt @@ -11,6 +11,7 @@ SYNOPSIS [verse] 'git worktree add' [-f] [--detach] [-b ] [] 'git worktree prune' [-n] [-v] [--expire ] +'git worktree list' [--path-only] DESCRIPTION ----------- @@ -59,6 +60,12 @@ prune:: Prune working tree information in $GIT_DIR/worktrees. +list:: + +List the main worktree followed by all of the linked worktrees. The default +format of the list includes the full path to the worktree and the branch or +revision that the head of that worktree is currently pointing to. + OPTIONS ------- @@ -93,6 +100,9 @@ OPTIONS --expire