Skip to content

Commit

Permalink
Merge pull request #138 from peckpeck/bug_8258/rudder_dev_should_not_…
Browse files Browse the repository at this point in the history
…unstash_something_it_has_not_stashed_itself

Fixes #8258: rudder-dev should not unstash something it has not stashed itself
  • Loading branch information
VinceMacBuche committed May 10, 2016
2 parents 09eac84 + 64dc587 commit a2bd426
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 @@ -1149,6 +1149,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 @@ -1173,9 +1177,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 a2bd426

Please sign in to comment.