Class: Git::Commands::Stash::Create Private

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

Create a stash commit without storing it in refs/stash

This is a plumbing command used to create a stash commit object without actually storing it in the stash reflog. It's useful for scripts that need to create stash commits programmatically.

The command creates a stash commit and outputs its SHA, but does not update refs/stash. Use Store to store the commit in the stash reflog.

Examples:

Create a stash commit

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

Create a stash commit with a message

Git::Commands::Stash::Create.new(execution_context).call('WIP: my changes')

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

#callGit::CommandLineResult #call(message) ⇒ Git::CommandLineResult

Create a stash commit

Overloads:

  • #callGit::CommandLineResult

    Create a stash commit without a message

  • #call(message) ⇒ Git::CommandLineResult

    Create a stash commit with a message

    Parameters:

    • message (String)

      optional message for the stash commit

Returns:

Raises:



# File 'lib/git/commands/stash/create.rb', line 38