Stash.apply Async
Stash.apply(repo, index, options).then(function(result) {
// Use result
});
Parameters |
Type |
|
repo |
Repository |
The owning repository. |
index |
Number |
The position within the stash list. 0 points to the most recent stashed state. |
options |
StashApplyOptions |
Optional options to control how stashes are applied. |
| Returns | |
| — | — |
| Number | 0 on success, GIT_ENOTFOUND if there’s no stashed state for the
given index, GIT_EMERGECONFLICT if changes exist in the working
directory, or an error code |
Stash.drop Async
Stash.drop(repo, index).then(function(result) {
// Use result
});
Parameters |
Type |
|
repo |
Repository |
The owning repository. |
index |
Number |
The position within the stash list. 0 points to the most recent stashed state. |
Returns |
|
Number |
0 on success, GIT_ENOTFOUND if there’s no stashed state for the given |
index, or error code. |
|
Stash.foreach Async
Stash.foreach(repo, callback, payload).then(function(result) {
// Use result
});
Parameters |
Type |
|
repo |
Repository |
Repository where to find the stash. |
callback |
StashCb |
Callback to invoke per found stashed state. The most recent stash state will be enumerated first. |
payload |
Void |
Extra parameter to callback function. |
Returns |
|
Number |
0 on success, non-zero callback return value, or error code. |
Stash.pop Async
Stash.pop(repo, index, options).then(function(result) {
// Use result
});
Parameters |
Type |
|
repo |
Repository |
The owning repository. |
index |
Number |
The position within the stash list. 0 points to the most recent stashed state. |
options |
StashApplyOptions |
Optional options to control how stashes are applied. |
Returns |
|
Number |
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) |
|
Stash.save Async
Stash.save(repo, stasher, message, flags).then(function(oid) {
// Use oid
});
Parameters |
Type |
|
repo |
Repository |
The owning repository. |
stasher |
Signature |
The identity of the person performing the stashing. |
message |
String |
Optional description along with the stashed state. |
flags |
Number |
Flags to control the stashing process. (see GIT_STASH_* above) |
Returns |
|
Oid |
Object id of the commit containing the stashed state. |
This commit is also the target of the direct reference refs/stash. |
|
Stash.APPLY_FLAGS ENUM
Flag |
Value |
Stash.APPLY_FLAGS.APPLY_DEFAULT |
0 |
Stash.APPLY_FLAGS.APPLY_REINSTATE_INDEX |
1 |
Stash.APPLY_PROGRESS ENUM
Flag |
Value |
Stash.APPLY_PROGRESS.NONE |
0 |
Stash.APPLY_PROGRESS.LOADING_STASH |
1 |
Stash.APPLY_PROGRESS.ANALYZE_INDEX |
2 |
Stash.APPLY_PROGRESS.ANALYZE_MODIFIED |
3 |
Stash.APPLY_PROGRESS.ANALYZE_UNTRACKED |
4 |
Stash.APPLY_PROGRESS.CHECKOUT_UNTRACKED |
5 |
Stash.APPLY_PROGRESS.CHECKOUT_MODIFIED |
6 |
Stash.APPLY_PROGRESS.DONE |
7 |
Stash.FLAGS ENUM
Flag |
Value |
Stash.FLAGS.DEFAULT |
0 |
Stash.FLAGS.KEEP_INDEX |
1 |
Stash.FLAGS.INCLUDE_UNTRACKED |
2 |
Stash.FLAGS.INCLUDE_IGNORED |
4 |