module Git::Repository::Stashing

Facade methods for stash operations

Each method maps onto a ‘git stash` subcommand. Methods that identify or create a stash entry ({#stash_infos}, {#stash_push}, {#stash_store}) return {Git::StashInfo} values; methods that only change or display the stash return git’s stdout. Every method that takes a stash ({#stash_apply}, {#stash_pop}, {#stash_drop}, {#stash_show}, {#stash_branch}) accepts a {Git::StashInfo}, a ‘stash@{N}` name, an Integer index (`0` is the most recent entry), or `nil` for the most recent entry. Methods that take options accept them as a trailing positional Hash, so `repo.stash_apply(index: true)` and `repo.stash_apply(nil, opts)` with a stored `opts` Hash both work.

{#stashes_all}, {#stash_save}, and {#stash_list} are the legacy surface. They are deprecated and will be removed in v6.0.0.

Included by {Git::Repository}.

@api private