libgit2

git_stash_save_with_opts

Version:

Save the local modifications to a new stash, with options.

Signature

int git_stash_save_with_opts(git_oid *out, git_repository *repo, const git_stash_save_options *opts);

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
opts

The stash options.

Returns

int

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

Versions