Class: Git::Commands::Stash::Store Private

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

Store a commit in the stash reflog

This is a plumbing command used to store a given stash commit (created by git stash create) in the stash reflog, updating refs/stash.

This command is typically used after Create to actually record the stash in the reflog.

Examples:

Store a stash commit

Git::Commands::Stash::Store.new(execution_context).call('abc123def456')

Store with a custom message

Git::Commands::Stash::Store.new(execution_context).call('abc123def456', message: 'WIP: feature')

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

Store a commit in the stash reflog

Returns the result of calling git stash store.

Parameters:

  • commit (String)

    the commit SHA to store in the stash (required)

  • options (Hash)

    command options

Options Hash (**options):

  • :message (String) — default: nil

    description for the reflog entry

    Alias: :m

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

    suppress output

    Alias: :q

Returns:

Raises:



# File 'lib/git/commands/stash/store.rb', line 39