aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorGuido Günther <agx@sigxcpu.org>2009-11-07 15:02:53 +0100
committerGuido Günther <agx@sigxcpu.org>2009-11-07 15:02:53 +0100
commit526fc0cefff0403ada331042437560119ae91fd6 (patch)
treede8e99e1243491971fd4de70fb56f36c856171e6
parent509c1c3a1e58f3484317e578138d88ff6e56cd06 (diff)
add option to drop patch-queue branch
-rwxr-xr-xexamples/gbp-pq19
1 files changed, 19 insertions, 0 deletions
diff --git a/examples/gbp-pq b/examples/gbp-pq
index 93ebc45f..035412ab 100755
--- a/examples/gbp-pq
+++ b/examples/gbp-pq
@@ -83,6 +83,20 @@ pq_import()
QUILT_PATCHES=$patches git quiltimport
}
+pq_drop()
+{
+ local branch=$1
+ local pq="patch-queue/$branch"
+
+ if is_patch_queue $branch; then
+ echo "On a patch-queue branch, can't drop it."
+ return 1
+ else
+ git branch -D ${pq}
+ echo "Dropped ${pq}."
+ fi
+}
+
usage ()
{
cat <<EOF
@@ -96,6 +110,8 @@ Options:
rebase Switch to associated patch-queue branch and rebase
against current branch.
+
+ drop Drop (delete) the corresponding patch-queue branch
EOF
}
@@ -111,6 +127,9 @@ case "$1" in
rebase)
pq_rebase $branch
;;
+ drop)
+ pq_drop $branch
+ ;;
*)
usage
exit 1