diff options
author | Junio C Hamano <gitster@pobox.com> | 2007-11-17 21:39:37 -0800 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2007-11-17 21:39:37 -0800 |
commit | 9f4c4eb0e16d1e21eaaf5cab5591c3491456cd14 (patch) | |
tree | 8d5ce2c1b19e1c077e8fee1e93af2f6506a6e491 /git-quiltimport.sh | |
parent | 9716f21b483233536d1eca9498f4ae4433dfd34f (diff) | |
parent | 9e384b4589cfba8fa057e0e124cdd4f6cc92fc66 (diff) | |
download | git-9f4c4eb0e16d1e21eaaf5cab5591c3491456cd14.tar.gz |
Merge branch 'ph/parseopt-sh'
* ph/parseopt-sh:
git-quiltimport.sh fix --patches handling
git-am: -i does not take a string parameter.
sh-setup: don't let eval output to be shell-expanded.
git-sh-setup: fix parseopt `eval` string underquoting
Give git-am back the ability to add Signed-off-by lines.
git-rev-parse --parseopt
scripts: Add placeholders for OPTIONS_SPEC
Migrate git-repack.sh to use git-rev-parse --parseopt
Migrate git-quiltimport.sh to use git-rev-parse --parseopt
Migrate git-checkout.sh to use git-rev-parse --parseopt --keep-dashdash
Migrate git-instaweb.sh to use git-rev-parse --parseopt
Migrate git-merge.sh to use git-rev-parse --parseopt
Migrate git-am.sh to use git-rev-parse --parseopt
Migrate git-clone to use git-rev-parse --parseopt
Migrate git-clean.sh to use git-rev-parse --parseopt.
Update git-sh-setup(1) to allow transparent use of git-rev-parse --parseopt
Add a parseopt mode to git-rev-parse to bring parse-options to shell scripts.
Diffstat (limited to 'git-quiltimport.sh')
-rwxr-xr-x | git-quiltimport.sh | 39 |
1 files changed, 16 insertions, 23 deletions
diff --git a/git-quiltimport.sh b/git-quiltimport.sh index 880c81d121..6b0c4d2f27 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 + --patches) shift QUILT_PATCHES="$1" - shift ;; - + --) + shift + break;; *) - break + usage ;; esac + shift done # Quilt Author |