diff options
author | Guido Günther <agx@sigxcpu.org> | 2009-11-07 15:02:53 +0100 |
---|---|---|
committer | Guido Günther <agx@sigxcpu.org> | 2009-11-07 15:02:53 +0100 |
commit | 526fc0cefff0403ada331042437560119ae91fd6 (patch) | |
tree | de8e99e1243491971fd4de70fb56f36c856171e6 /examples | |
parent | 509c1c3a1e58f3484317e578138d88ff6e56cd06 (diff) | |
download | git-buildpackage-526fc0cefff0403ada331042437560119ae91fd6.tar.gz git-buildpackage-526fc0cefff0403ada331042437560119ae91fd6.tar.bz2 git-buildpackage-526fc0cefff0403ada331042437560119ae91fd6.zip |
add option to drop patch-queue branch
Diffstat (limited to 'examples')
-rwxr-xr-x | examples/gbp-pq | 19 |
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 |