summaryrefslogtreecommitdiff
path: root/git-quiltimport.sh
diff options
context:
space:
mode:
authorPierre Habouzit <madcoder@debian.org>2007-11-04 10:31:01 (GMT)
committerJunio C Hamano <gitster@pobox.com>2007-11-06 06:48:13 (GMT)
commite01fbf1a8f185bf6722e828286862a4122269ef7 (patch)
treeb389da6319d5b8423aabd7359ca5cb119e2310b9 /git-quiltimport.sh
parent00df3bed2bf77ad31094e6d064d2c4f069086b41 (diff)
downloadgit-e01fbf1a8f185bf6722e828286862a4122269ef7.zip
git-e01fbf1a8f185bf6722e828286862a4122269ef7.tar.gz
git-e01fbf1a8f185bf6722e828286862a4122269ef7.tar.bz2
Migrate git-quiltimport.sh to use git-rev-parse --parseopt
Signed-off-by: Pierre Habouzit <madcoder@debian.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'git-quiltimport.sh')
-rwxr-xr-xgit-quiltimport.sh39
1 files changed, 16 insertions, 23 deletions
diff --git a/git-quiltimport.sh b/git-quiltimport.sh
index 880c81d..56c9569 100755
--- a/git-quiltimport.sh
+++ b/git-quiltimport.sh
@@ -1,5 +1,12 @@
#!/bin/sh
-USAGE='--dry-run --author <author> --patches </path/to/quilt/patch/directory>'
+OPTIONS_KEEPDASHDASH=
+OPTIONS_SPEC="\
+git-quiltimport [options]
+--
+n,dry-run dry run
+author= author name and email address for patches without any
+patches= path to the quilt series and patches
+"
SUBDIRECTORY_ON=Yes
. git-sh-setup
@@ -8,39 +15,25 @@ quilt_author=""
while test $# != 0
do
case "$1" in
- --au=*|--aut=*|--auth=*|--autho=*|--author=*)
- quilt_author=$(expr "z$1" : 'z-[^=]*\(.*\)')
- shift
- ;;
-
- --au|--aut|--auth|--autho|--author)
- case "$#" in 1) usage ;; esac
+ --author)
shift
quilt_author="$1"
- shift
;;
-
- --dry-run)
- shift
+ -n|--dry-run)
dry_run=1
;;
-
- --pa=*|--pat=*|--patc=*|--patch=*|--patche=*|--patches=*)
- QUILT_PATCHES=$(expr "z$1" : 'z-[^=]*\(.*\)')
- shift
- ;;
-
- --pa|--pat|--patc|--patch|--patche|--patches)
- case "$#" in 1) usage ;; esac
- shift
+ --patches)
QUILT_PATCHES="$1"
shift
;;
-
+ --)
+ shift
+ break;;
*)
- break
+ usage
;;
esac
+ shift
done
# Quilt Author