Class: Git::Commands::Stash::Drop Private

Inherits:
Base
  • Object
show all
Defined in:
lib/git/commands/stash/drop.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-stash/2.53.0

Remove a stash entry from the stash list

Removes a single stash entry from the list of stash entries. If no stash reference is given, it removes the latest one.

Examples:

Drop the latest stash

Git::Commands::Stash::Drop.new(execution_context).call

Drop a specific stash

Git::Commands::Stash::Drop.new(execution_context).call('stash@\\{2}')

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 #call(stash, **options) ⇒ Git::CommandLineResult

Drop a stash entry

Overloads:

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

    Drop the latest stash

    Parameters:

    • options (Hash)

      command options

    Options Hash (**options):

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

      suppress informational messages

      Alias: :q

  • #call(stash, **options) ⇒ Git::CommandLineResult

    Drop a specific stash

    Parameters:

    • stash (String)

      stash reference (e.g., 'stash@{0}', '0')

    • options (Hash)

      command options

    Options Hash (**options):

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

      suppress informational messages

      Alias: :q

Returns:

Raises:



# File 'lib/git/commands/stash/drop.rb', line 35