Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions apply_pr/fabfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -238,6 +238,11 @@ def apply(diff, stash=True, reject=False, message=None):
if stash and stashed:
print(colors.yellow('Unstashing...'))
sudo("git stash pop")
error_on_pop = sudo("test -f .gitignore && git ls-files -om -X .gitignore || git ls-files -u")
if error_on_pop:
sudo("git reset --merge")
print(colors.red('\U000026D4 Error on stash pop. Keeping stash...'))
raise


class GitApplier(object):
Expand Down