From: David Turner Date: Thu, 13 Aug 2015 19:26:29 GMT Subject: Re: [PATCH 2/2 v4] worktree: add 'list' command Message-ID: <1439493989.8855.18.camel@twopensource.com> In-Reply-To: <1439490739-9361-3-git-send-email-rappazzo@gmail.com> On Thu, 2015-08-13 at 14:32 -0400, Michael Rappazzo wrote: > 'git worktree list' uses the for_each_worktree function to iterate, > and outputs in the format: ' ()' I'm not sure I'm going to have time to review the whole thing, but I think we ought to have tests with both bare and non-bare main repos. > Signed-off-by: Michael Rappazzo > --- > Documentation/git-worktree.txt | 11 ++++++++- > builtin/worktree.c | 55 ++++++++++++++++++++++++++++++++++++++++++ > t/t2027-worktree-list.sh | 51 +++++++++++++++++++++++++++++++++++++++ > 3 files changed, 116 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