libgit2

git_stash_save

Version:

Save the local modifications to a new stash.

Signature

int git_stash_save(git_oid *out, git_repository *repo, git_signature *stasher, const char *message, unsigned int flags);

Parameters

In
out

Object id of the commit containing the stashed state. This commit is also the target of the direct reference refs/stash.

In
repo

The owning repository.

In
stasher

The identity of the person performing the stashing.

const char *
In
message

Optional description along with the stashed state.

unsigned int
In
flags

Flags to control the stashing process. (see GIT_STASH_* above)

Returns

int

0 on success, GIT_ENOTFOUND where there's nothing to stash, or error code.

Versions