blob: 2a382647dda2040d08e756b189642f9a23e0d14c [file] [log] [blame]
#!/bin/sh
set -e
# stg-unnew - sort of "reverse an 'stg new'"
# Remove the current patch from the stack, keeping its contents as
# uncommitted changes.
# CAVEAT: running this script on the bottom-most patch fails, since
# "stg pick --fold" does not allow this situation.
# Copyright (c) 2007 Yann Dirson <ydirson@altern.org>
# Subject to the GNU GPL, version 2.
patch=$(stg top)
stg pop
stg pick --fold $patch
stg delete $patch