git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [PATCH v5 2/2] worktree: add 'list' command

From
MMMikael Magnusson <mikachu@gmail.com>
Date
Aug 25, 2015, 03:01 UTC
Message-ID
<CAHYJk3SaDAJ6rfB2=GtGdeL47=Ckyrktd3qEM-UBH4ZbPYtKgg@mail.gmail.com>
In-Reply-To
<1440280294-50679-3-git-send-email-rappazzo@gmail.com>
On Sat, Aug 22, 2015 at 11:51 PM, Michael Rappazzo <rappazzo@gmail.com> wrote:
Show 32 quoted lines
> 'git worktree list' uses the for_each_worktree function to iterate,
> and outputs in the format: '<worktree>  (<short-ref>)'
>
> Signed-off-by: Michael Rappazzo <rappazzo@gmail.com>
> ---
>  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 <new-branch>] <path> [<branch>]
>  'git worktree prune' [-n] [-v] [--expire <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.
Maybe just "and the branch or revision currently checked out in that worktree."?
-- 
Mikael Magnusson
Previous: Eric Sunshine
Message 6 of 6 in “Worktree: for-each function and list command”
  1. 0/2 Worktree: for-each function and list commandMichael Rappazzo, Aug 22, 2015
  2. 1/2 worktree: add 'for_each_worktree' functionMichael Rappazzo, Aug 22, 2015
  3. 2/2 worktree: add 'list' commandMichael Rappazzo, Aug 22, 2015
  4. Junio C HamanoAug 24, 2015
  5. Eric SunshineAug 25, 2015
  6. Mikael MagnussonAug 25, 2015

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.