Class: Git::Commands::Worktree::List Private

Inherits:
Base
  • Object
show all
Defined in:
lib/git/commands/worktree/list.rb

Overview

This class is part of a private API. You should avoid using this class if possible, as it may be removed or be changed in the future.

Note:

arguments block audited against https://git-scm.com/docs/git-worktree/2.54.0

Lists all worktrees attached to the repository

Examples:

List all worktrees in porcelain format

Git::Commands::Worktree::List.new(execution_context).call(porcelain: true)

See Also:

Instance Method Summary collapse

Methods inherited from Base

allow_exit_status, arguments, #initialize, requires_git_version, skip_version_validation

Constructor Details

This class inherits a constructor from Git::Commands::Base

Instance Method Details

#call(**options) ⇒ Git::CommandLineResult

List all worktrees attached to the repository

Parameters:

  • options (Hash)

    command options

Options Hash (**options):

  • :porcelain (Boolean, nil) — default: nil

    produce machine-readable output

  • :z (Boolean, nil) — default: nil

    terminate output lines with NUL bytes (use with :porcelain)

  • :verbose (Boolean, nil) — default: nil

    output additional information about worktrees

    Alias: :v

  • :expire (String) — default: nil

    annotate missing worktrees as prunable if older than this time expression

Returns:

Raises:

  • (ArgumentError)

    if unsupported options are provided

  • (Git::FailedError)

    if git exits with a non-zero exit status



# File 'lib/git/commands/worktree/list.rb', line 32