Skip to content

Commit

Permalink
Fixes #8258: rudder-dev should not unstash something it has not stash…
Browse files Browse the repository at this point in the history
…ed itself
  • Loading branch information
peckpeck committed May 10, 2016
1 parent 79635ee commit 64dc587
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions scripts/rudder-dev/rudder-dev
Original file line number Diff line number Diff line change
Expand Up @@ -1146,6 +1146,10 @@ unstashed=False
def unstash():
global unstashed

# only unstash things we have stashed
if not stashed:
return

# get current branch (the global variable may not be accurate in flight)
this_branch = shell("git rev-parse --abbrev-ref HEAD", keep_output=True).strip()

Expand All @@ -1170,9 +1174,9 @@ def unstash():
# Tell the user if some stash command happened
def stash_info():
if stashed:
print("Some work in progress has been found, I stashed it before running the commands, to retrieve it use git stash pop")
print("Some work in progress has been found, " + ERROR_TPL.format("I stashed it") + " before running the commands, to retrieve it use git stash pop")
if unstashed:
print("Previous work in progress has been found in the stash, I unstashed it, to hide it, use git stash save")
print("Previous work in progress has been found in the stash, " + ERROR_TPL.format("I unstashed it") + ", to hide it again, use git stash save")


###
Expand Down

0 comments on commit 64dc587

Please sign in to comment.