View on
MetaCPAN is shutting down
For details read Perl NOC. After June 25th this page will redirect to
Jacques Germishuys > Git-Raw > Git::Raw::Stash



Annotate this POD


View/Report Bugs
Module Version: 0.80   Source  


Git::Raw::Stash - Git stash class


version 0.80


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).


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:

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:

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.


Alessandro Ghedini <>

Jacques Germishuys <>


Copyright 2012 Alessandro Ghedini.

This program is free software; you can redistribute it and/or modify it under the terms of either: the GNU General Public License as published by the Free Software Foundation; or the Artistic License.

See for more information.

syntax highlighting: