2.46 Stash
(require libgit2/include/stash) | package: libgit2 |
procedure
(git_stash_apply repo index options) → integer?
repo : repository? index : integer? options : git_stash_apply_opts?
If local changes in the working directory conflict with changes in the stash then GIT_EMERGECONFLICT will be returned. In this case, the index will always remain unmodified and all files in the working directory will remain unmodified. However, 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.
If passing the GIT_STASH_APPLY_REINSTATE_INDEX flag and there would be conflicts when reinstating the index, the function will return GIT_EMERGECONFLICT and both the working directory and index will be left unmodified.
Note that a minimum checkout strategy of GIT_CHECKOUT_SAFE is implied.
procedure
(git_stash_apply_init_options opts version) → integer?
opts : git_stash_apply_opts? version : integer?
procedure
(git_stash_foreach repo callback payload) → integer?
repo : repository? callback : git_stash_cb payload : bytes?
If the callback returns a non-zero value, this will stop looping.
procedure
(git_stash_pop repo index options) → integer?
repo : repository? index : integer? options : stash_apply_options?