From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 23338 invoked by alias); 24 Jul 2016 21:12:08 -0000 Mailing-List: contact zsh-workers-help@zsh.org; run by ezmlm Precedence: bulk X-No-Archive: yes List-Id: Zsh Workers List List-Post: List-Help: X-Seq: 38939 Received: (qmail 23457 invoked from network); 24 Jul 2016 21:12:08 -0000 X-Qmail-Scanner-Diagnostics: from nm38.bullet.mail.ir2.yahoo.com by f.primenet.com.au (envelope-from , uid 7791) with qmail-scanner-2.11 (clamdscan: 0.99.2/21882. spamassassin: 3.4.1. Clear:RC:0(212.82.96.63):SA:0(0.0/5.0):. Processed in 0.435518 secs); 24 Jul 2016 21:12:08 -0000 X-Spam-Checker-Version: SpamAssassin 3.4.1 (2015-04-28) on f.primenet.com.au X-Spam-Level: X-Spam-Status: No, score=0.0 required=5.0 tests=FREEMAIL_FROM,SPF_PASS, T_DKIM_INVALID autolearn=unavailable autolearn_force=no version=3.4.1 X-Envelope-From: okiddle@yahoo.co.uk X-Qmail-Scanner-Mime-Attachments: | X-Qmail-Scanner-Zip-Files: | Received-SPF: pass (ns1.primenet.com.au: SPF record at _spf.mail.yahoo.com designates 212.82.96.63 as permitted sender) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.co.uk; s=s2048; t=1469394388; bh=CCKqjQWSE54iNBJmal0Yfip2Nc18sgydRqZOfI7q+jY=; h=cc:In-reply-to:From:References:To:Subject:Date:From:Subject; b=CH6EbUIV3684lZZU2xkj93c8lRmhunsqv/WGxv8269ZP/tX/c7inqtMjj++NgWLfZoKuzEJGqB7Ck5TeAyveXdxoqOiIVB6JNfGIj1UzKkRG4n9GjY+T/a23Nn1znaDLsJA/pjKULbUIJdwJSqS+unRVxkOUNlZXi0/9jaao1VqXKwAuT+qnb01mkA+24fUNclCMLz4gzNsiYxipzGhX0AJXIAKbV0x9q9w+6G0/+zoyKjTbqngHuRX8/ncaoKj1Efm83hQsWk2CDEpSTCp15z2Li0Okeb3A6OVtIeJ6XNcwS0a61TtpN9scObSeI0Wu/0iYkRikIom+eLI1Nswzzw== X-Yahoo-Newman-Id: 69534.87779.bm@smtp127.mail.ir2.yahoo.com X-Yahoo-Newman-Property: ymail-3 X-YMail-OSG: 2iYP2fYVM1mKIcAcy91H6960HxXi7pqqUxaQXdahd50.4SN hqAealtaD2vcJRGvRPop_rbjzZol7NYTUzALd1NdnfGnLAXzlukj7y94WuW. U2HCMdaV3o6snPIyEY6g4J6vpeEEaXrzZpfKyykSxyuok6jKkM5sJos2HKJ8 f4qDzMKF.vq3Q6Q7yHfkoiMdCjXSVEdlBV.lt5LBouYUBpGki_fvK.mlnNJ9 e23bkgfu6EP9G42ZBjMSR1cDx_HZAUeE_mUxwBUc5YLxFEooqbOHSmMxTLew fGdc_aXuMbi9MEAez59GOPOWFM0xzhB_L_saLB9f0pzdpNnkKWjSkSbB.YzQ DnC8zGSA.NnzzEDhOCpxxjUPPDepgMKwyUoGAKOsShLytw5NXWkdeJuPrWE9 u8oxIxN9eGOWVx.2law0FAYALAgOoi.obCTtCrt8TsaZACQW69bYyvFcHzKj CO01BM5Iq0._Kk5JtKN9SMhz3SV5UnjbRTQC0hPNSxL5WYi5TfB7nSCmTerF 0Lhe3gzP4EU.6f6YBwWFB4ryyvZ8R5yOCBWG880z5mdA- X-Yahoo-SMTP: opAkk_CswBAce_kJ3nIPlH80cJI- cc: zsh-workers@zsh.org In-reply-to: From: Oliver Kiddle References: To: NP-Hardass Subject: Re: [Feature Request] git push completion for signed pushes MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <23391.1469394387.1@hydra.kiddle.eu> Date: Sun, 24 Jul 2016 23:06:27 +0200 Message-ID: <23392.1469394387@hydra.kiddle.eu> NP-Hardass wrote: > Git added the ability to have GPG signed pushes in v2.2.0 [1] back in > 2014. however, there is currently no completion for these options. As a > result, I'd like to request that they be added. Looks like these apply to git push and git send-pack. This patch adds them and a few other missing options. diff --git a/Completion/Unix/Command/_git b/Completion/Unix/Command/_git index b6da329..b54b208 100644 --- a/Completion/Unix/Command/_git +++ b/Completion/Unix/Command/_git @@ -510,7 +510,7 @@ _git-cherry-pick () { '(-S --gpg-sign --no-gpg-sign)'{-S-,--gpg-sign=-}'[GPG-sign the commit]::key id' \ '(-S --gpg-sign --no-gpg-sign)--no-gpg-sign[do not GPG-sign the commit]' \ '*'{-s+,--strategy=}'[use given merge strategy]:merge strategy:__git_merge_strategies' \ - '*'{-X+,--strategy-option=}'[pass merge-strategy-specific option to merge strategy]' \ + '*'{-X+,--strategy-option=}'[pass merge-strategy-specific option to merge strategy]:option' \ '(-e --edit -x -n --no-commit -s --signoff)--ff[fast forward, if possible]' \ ': : __git_commit_ranges -O expl:git_commit_opts' } @@ -1149,6 +1149,7 @@ _git-mv () { declare -A opt_args _arguments -w -C -S -s \ + '(-v --verbose)'{-v,--verbose}'[output additional information]' \ '(-f --force)'{-f,--force}'[rename/move even if targets exist]' \ '-k[skip rename/move that would lead to errors]' \ '(-n --dry-run)'{-n,--dry-run}'[only show what would happen]' \ @@ -1278,7 +1279,7 @@ _git-push () { '--mirror[push all refs under refs/heads/ and refs/tags/ and delete non-existing refs]' \ '(-n --dry-run)'{-n,--dry-run}'[do everything except actually send the updates]' \ '--porcelain[produce machine-readable output]' \ - '--delete[delete all listed refs from the remote repository]' \ + '(-d --delete)'{-d,--delete}'[delete all listed refs from the remote repository]' \ '--tags[all tags under refs/tags are pushed]' \ '--follow-tags[also push missing annotated tags reachable from the pushed refs]' \ '(--receive-pack --exec)'{--receive-pack=-,--exec=-}'[path to git-receive-pack on remote]:remote git-receive-pack:_files' \ @@ -1295,6 +1296,12 @@ _git-push () { '(--verify)--no-verify[bybass the pre-push hook]' \ '--recurse-submodules=[submodule handling]:submodule handling:((check\:"refuse pushing of supermodule if submodule commit cannot be found on the remote" on-demand\:"push all changed submodules"))' \ + '(--no-signed --signed)--sign=[GPG sign the push]:signing enabled:(yes no if-asked)' \ + '(--no-signed --sign)--signed[GPG sign the push]' \ + "(--sign --sign)--no-signed[don't GPG sign the push]" \ + '--atomic[request atomic transaction on remote side]' \ + '(-4 --ipv4 -6 --ipv6)'{-4,--ipv4}'[use IPv4 addresses only]' \ + '(-4 --ipv4 -6 --ipv6)'{-6,--ipv6}'[use IPv6 addresses only]' \ ': :__git_any_repositories' \ '*: :__git_ref_specs_pushy' && ret=0 @@ -1323,17 +1330,21 @@ _git-rebase () { fi _arguments -A '-*' \ - '(- :)--continue[continue after resolving merge conflict]' \ - '(- :)--abort[abort current rebase]' \ - '--keep-empty[keep empty commits in the result]' \ - '(- :)--skip[skip the current patch]' \ + - actions \ + '(-)--continue[continue after resolving merge conflict]' \ + '(-)--abort[abort current rebase]' \ + '(-)--edit-todo[edit interactive instruction sheet in an editor]' \ + '(-)--skip[skip the current patch]' \ + - options \ + "--keep-empty[keep empty commits in the result]" \ '(-m --merge)'{-m,--merge}'[use merging strategies to rebase]' \ '(-S --gpg-sign --no-gpg-sign)'{-S-,--gpg-sign=-}'[GPG-sign the commit]::key id' \ '(-S --gpg-sign --no-gpg-sign)--no-gpg-sign[do not GPG-sign the commit]' \ '*'{-s+,--strategy=}'[use given merge strategy]:merge strategy:__git_merge_strategies' \ - '*'{-X+,--strategy-option=}'[pass merge-strategy-specific option to merge strategy]' \ + '*'{-X+,--strategy-option=}'[pass merge-strategy-specific option to merge strategy]:option' \ '(-q --quiet -v --verbose --stat -n --no-stat)'{-q,--quiet}'[suppress all output]' \ '(-q --quiet -v --verbose --stat -n --no-stat)'{-v,--verbose}'[output additional information]' \ + '--rerere-autoupdate[allow rerere to update index with resolved conflicts' \ '--no-verify[bypass the pre-rebase hook]' \ '-C-[ensure that given lines of surrounding context match]: :__git_guard_number "lines of context"' \ '(-f --force-rebase)'{-f,--force-rebase}'[force rebase even if current branch descends from commit rebasing onto]' \ @@ -1341,13 +1352,13 @@ _git-rebase () { '(-i --interactive)--whitespace=-[detect a new or modified line that has whitespace errors]: :__git_apply_whitespace_strategies' \ '(-i --interactive)--committer-date-is-author-date[use author date as committer date]' \ '(-i --interactive --ignore-whitespace --whitespace --committer-date-is-author-date)'{-i,--interactive}'[make a list of commits to be rebased and open in $EDITOR]' \ - '--edit-todo[edit interactive instruction sheet in an editor]' \ '(-p --preserve-merges --interactive)'{-p,--preserve-merges}'[try to recreate merges instead of ignoring them]' \ {-x+,--exec=}'[with -i\: append "exec " after each line]:command:_command_names -e' \ '(1)--root[rebase all reachable commits]' \ $autosquash_opts \ '(--autostash --no-autostash)--autostash[stash uncommitted changes before rebasing and apply them afterwards]' \ '(--autostash --no-autostash)--no-autostash[do not stash uncommitted changes before rebasing and apply them afterwards]' \ + '--ignore-date[use current timestamp for author date]' \ '--no-ff[cherry-pick all rebased commits with --interactive, otherwise synonymous to --force-rebase]' \ '--onto=[start new branch with HEAD equal to given revision]:newbase:__git_revisions' \ ':upstream branch:__git_revisions' \ @@ -1395,6 +1406,8 @@ _git-revert () { '(-m --mainline)'{-m+,--mainline=}'[pick which parent is mainline]:parent number' \ '(-n --no-commit)'{-n,--no-commit}'[do not commit the reversion]' \ '(-s --signoff)'{-s,--signoff}'[add Signed-off-by line at the end of the commit message]' \ + '--strategy=[use given merge strategy]:merge strategy:__git_merge_strategies' \ + '*'{-X,--strategy-option=}'[pass merge-strategy-specific option to merge strategy]:option' '(-S --gpg-sign --no-gpg-sign)'{-S-,--gpg-sign=-}'[GPG-sign the commit]::key id' \ '(-S --gpg-sign --no-gpg-sign)--no-gpg-sign[do not GPG-sign the commit]' \ ': :__git_commits' @@ -1842,15 +1855,16 @@ _git-tag () { if (( words[(I)-[asu]] )); then message_opts=( - '( -F)-m+[specify tag message]:message' - '(-m )-F+[read tag message from given file]:message file:_files') + '(-m --message -F --file)'{-m+,--message=}'[specify tag message]:message' + '(-m --message -F --file)'{-F+,--file=}'[read tag message from given file]:message file:_files' + ) fi _arguments -A '-*' \ - creation \ - '( -s -u --local-user)-a[create an unsigned, annotated tag]' \ - '(-a -u --local-user)-s[create an signed and annotated tag]' \ - '(-a -s)'{-u+,--local-user=}'[create a tag, annotated and signed with the given key]: :__git_gpg_secret_keys' \ + '(-a --annotate -s --sign -u --local-user)'{-a,--annotate}'[create an unsigned, annotated tag]' \ + '(-a --annotate -s --sign -u --local-user)'{-s,--sign}'[create an signed and annotated tag]' \ + '(-a --annotate -s --sign)'{-u+,--local-user=}'[create a tag, annotated and signed with the given key]: :__git_gpg_secret_keys' \ '-f[replace existing tag]' \ '--cleanup=[cleanup message]:mode:((verbatim\:"no cleanup" whitespace\:"remove leading and trailing whitespace" strip\:"remove leading and trailing whitespace and comments"))' \ $message_opts \ @@ -3129,6 +3143,7 @@ _git-prune () { _arguments -S \ '(-n --dry-run)'{-n,--dry-run}'[do not remove anything; just report what would be removed]' \ '(-v --verbose)'{-v,--verbose}'[report all removed objects]' \ + '--progress[show progress]' \ '--expire[only expire loose objects older than given date]: :__git_datetimes' \ '*:: :__git_heads' } @@ -3258,7 +3273,7 @@ _git-remote () { '(--tags )--no-tags[tell git fetch to not import every tag from remote repository]' \ '*'{-t,--track=}'[track given branch instead of default glob refspec]: :__git_branch_names' \ '(-m --master)'{-m,--master=}'[set HEAD of remote to point to given master branch]: :__git_branch_names' \ - '--mirror[do not use separate remotes]' \ + '--mirror[do not use separate remotes]::mirror type:(fetch pull)' \ ':name:__git_remotes' \ ':repository:->repository' && ret=0 case $state in @@ -4786,19 +4801,23 @@ _git-http-backend () { (( $+functions[_git-send-pack] )) || _git-send-pack () { - # TODO: --mirror is undocumented. - # TODO: --stateless-rpc is undocumented. - # TODO: --helper-status is undocumented. _arguments -A '-*' \ + '(-v --verbose)'{-v,--verbose}'[produce verbose output]' \ + '(-q --quiet)'{-q,--quiet}'[be more quiet]' \ '(--receive-pack --exec)'{--receive-pack=-,--exec=-}'[specify path to git-receive-pack on remote side]:remote path' \ + '--remote[specify remote name]:remote' \ '--all[update all refs that exist locally]' \ - '--dry-run[do everything except actually sending the updates]' \ - '--force[update remote orphaned refs]' \ - '-v[produce verbose output]' \ + '(-n --dry-run)'{-n,--dry-run}'[do everything except actually sending the updates]' \ + '--mirror[mirror all refs]' \ + '(-f --force)'{-f,--force}'[update remote orphaned refs]' \ + '(--no-signed --signed)--sign=[GPG sign the push]:signing enabled:(yes no if-asked)' \ + '(--no-signed --sign)--signed[GPG sign the push]' \ + "(--sign --sign)--no-signed[don't GPG sign the push]" \ '--thin[send a thin pack]' \ - '--mirror[undocumented]' \ - '--stateless-rpc[undocumented]' \ - '--helper-status[undocumented]' \ + '--atomic[request atomic transaction on remote side]' \ + '--stateless-rpc[use stateless RPC protocol]' \ + '--helper-status[print status from remote helper]' \ + '--force-with-lease=[require old value of ref to be at specified value]:refname\:expect' \ ': :__git_any_repositories' \ '*: :__git_remote_references' } @@ -6746,7 +6765,7 @@ __git_setup_merge_options () { '(-S --gpg-sign --no-gpg-sign)'{-S-,--gpg-sign=}'[GPG-sign the commit]::key id' \ '(-S --gpg-sign --no-gpg-sign)--no-gpg-sign[do not GPG-sign the commit]' \ '*'{-s,--strategy=}'[use given merge strategy]:merge strategy:__git_merge_strategies' - '*'{-X,--strategy-option=}'[pass merge-strategy-specific option to merge strategy]' + '*'{-X,--strategy-option=}'[pass merge-strategy-specific option to merge strategy]:option' '(--verify-signatures)--verify-signatures[verify the commits being merged or abort]' '(--no-verify-signatures)--no-verify-signatures[do not verify the commits being merged]' '(-q --quiet -v --verbose)'{-q,--quiet}'[suppress all output]'