Merge branch 'jc/stash-pop-not-popped'
"stash pop", upon failing to apply the stash, refrains from discarding the stash to avoid information loss. Be more explicit in the error message. The wording may want to get a bit more bikeshedding. * jc/stash-pop-not-popped: stash pop: mention we did not drop the stash upon failing to apply
This commit is contained in:
10
git-stash.sh
10
git-stash.sh
@ -512,8 +512,14 @@ apply_stash () {
|
|||||||
pop_stash() {
|
pop_stash() {
|
||||||
assert_stash_ref "$@"
|
assert_stash_ref "$@"
|
||||||
|
|
||||||
apply_stash "$@" &&
|
if apply_stash "$@"
|
||||||
drop_stash "$@"
|
then
|
||||||
|
drop_stash "$@"
|
||||||
|
else
|
||||||
|
status=$?
|
||||||
|
say "The stash is kept in case you need it again."
|
||||||
|
exit $status
|
||||||
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
drop_stash () {
|
drop_stash () {
|
||||||
|
Reference in New Issue
Block a user