Git::Raw::Stash(3pm)

Git::Raw::Stash3pm

Git stash class

Version

version 0.90

Overview

Helper class to manage stashes.

WARNING: The API of this module is unstable and may change without warning (any change will be appropriately documented in the changelog).

Methods

apply( $repo, $index, [\%stash_apply_opts] )

Apply a single stashed state from the stash list. If local changes in the working directory conflict with changes in the stash this function will throw a "Git::Raw::Error" exception with a "Git::Raw::Error::EMERGECONFLICT" error code. If you are restoring untracked files or ignored files and there is a conflict when applying the modified files, then those files will remain in the working directory. Valid fields for %stash_apply_opts include:

•

"checkout_opts"

See "Git::Raw::Repository->checkout()".

•

"flags"

•

"reinstate_index"

Try to reinstate not only the working tree's changes, but also the index's changes.

•

"callbacks"

•

"apply_progress"

Progress notification function. The callback receives a single $progress value which may be any constant provided by "Git::Raw::Stash::Progress".

pop( $repo, $index, [\%stash_apply_opts] )

Apply a single stashed state from the stash list and remove it from the list if successful.

save( $repo, $stasher, $msg [, \@opts] )

Save the local modifications to a new stash. Non-default options may be specified by providing the optional @opts argument. If files were stashed, this function will return a Git::Raw::Commit object, otherwise "undef".

Valid fields for the @opts array are:

•

"keep_index"

All changes already added to the index are left intact in the working directory. The default is to also stash changes in the index.

•

"include_untracked"

All untracked files are also stashed and then cleaned up from the working directory. The default is to leave untracked files in the working directory.

•

"include_ignored"

All ignored files are also stashed and then cleaned up up from the working directory. The default is to leave ignored files in the working directory.

foreach( $repo, $callback )

Run $callback for every stash in the repo. The callback receives three arguments: the stash $index, the stash $message and the stash $commit, a Git::Raw::Commit object. A non-zero return value will stop the loop.

drop( $repo, $index )

Remove a single stash from the stash list.

Releases

4 releases since Debian 10 (Buster); the text changed 3 times.

  1. 10
  2. 11
  3. 12
  4. 13

Author

Alessandro Ghedini <[email protected]>

Jacques Germishuys <[email protected]>

From libgit-raw-perl 0.90+ds-3+b1 in Debian 13 (Trixie). Parsed by carta from the page's man source.