3 # Copyright (c) Josef "Jeff" Sipek, 2006-2013
6 USAGE
="[-f] <patchname>"
7 if [ -z "$GUILT_VERSION" ]; then
8 echo "Invoking `basename "$0"` directly is no longer supported." >&2
21 if [ "$1" != "-f" ]; then
35 if [ -z "$patch" ]; then
36 die
"You must specify a patch to delete"
39 if [ ! -f "$GUILT_DIR/$branch/$patch" ]; then
40 die
"Patch $patch does not exist."
43 p
=`grep -e "^$patch$" < "$applied"`
44 if [ ! -z "$p" ] ; then
45 die
"Cannot delete an applied patch"
48 series_remove_patch
"$patch"
50 guilt_hook
"delete" "$patch"
52 [ ! -z "$force" ] && rm -f $GUILT_DIR/$branch/$patch