libgit2

git_stash_pop

Version:

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

Signature

int git_stash_pop(git_repository *repo, size_t index, const git_stash_apply_options *options);

Parameters

In
repo

The owning repository.

size_t
In
index

The position within the stash list. 0 points to the most recent stashed state.

In
options

Optional options to control how stashes are applied.

Returns

int

0 on success, GIT_ENOTFOUND if there's no stashed state for the given index, or error code. (see git_stash_apply() above for details)

Versions