From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 6450 invoked from network); 29 Jan 2009 12:22:50 -0000 X-Spam-Checker-Version: SpamAssassin 3.2.5 (2008-06-10) on f.primenet.com.au X-Spam-Level: X-Spam-Status: No, score=-2.6 required=5.0 tests=AWL,BAYES_00 autolearn=ham version=3.2.5 Received: from news.dotsrc.org (HELO a.mx.sunsite.dk) (130.225.247.88) by ns1.primenet.com.au with SMTP; 29 Jan 2009 12:22:50 -0000 Received-SPF: none (ns1.primenet.com.au: domain at sunsite.dk does not designate permitted sender hosts) Received: (qmail 69122 invoked from network); 29 Jan 2009 12:22:24 -0000 Received: from sunsite.dk (130.225.247.90) by a.mx.sunsite.dk with SMTP; 29 Jan 2009 12:22:24 -0000 Received: (qmail 9402 invoked by alias); 29 Jan 2009 12:22:01 -0000 Mailing-List: contact zsh-workers-help@sunsite.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 26470 Received: (qmail 9338 invoked from network); 29 Jan 2009 12:21:59 -0000 Received: from bifrost.dotsrc.org (130.225.254.106) by sunsite.dk with SMTP; 29 Jan 2009 12:21:59 -0000 Received: from bach.exherbo.org (bach.exherbo.org [78.47.197.147]) by bifrost.dotsrc.org (Postfix) with ESMTPS id 6ABEB80271F0 for ; Thu, 29 Jan 2009 13:21:55 +0100 (CET) Received: from ingmar by bach.exherbo.org with local (Exim 4.69) (envelope-from ) id 1LSVu3-0000LU-9c; Thu, 29 Jan 2009 12:21:51 +0000 From: Ingmar Vanhassel To: Zsh Hackers' List Cc: Ingmar Vanhassel Subject: [PATCH] Update "git svn" completion. Date: Thu, 29 Jan 2009 12:21:50 +0000 Message-Id: <1233231710-1204-9-git-send-email-ingmar@exherbo.org> X-Mailer: git-send-email 1.6.0.1 In-Reply-To: <1233231710-1204-8-git-send-email-ingmar@exherbo.org> References: <1233231710-1204-1-git-send-email-ingmar@exherbo.org> <1233231710-1204-2-git-send-email-ingmar@exherbo.org> <1233231710-1204-3-git-send-email-ingmar@exherbo.org> <1233231710-1204-4-git-send-email-ingmar@exherbo.org> <1233231710-1204-5-git-send-email-ingmar@exherbo.org> <1233231710-1204-6-git-send-email-ingmar@exherbo.org> <1233231710-1204-7-git-send-email-ingmar@exherbo.org> <1233231710-1204-8-git-send-email-ingmar@exherbo.org> X-Virus-Scanned: ClamAV 0.92.1/8918/Thu Jan 29 12:42:19 2009 on bifrost X-Virus-Status: Clean --- Completion/Unix/Command/_git | 44 +++++++++++++++++++++++++++-------------- 1 files changed, 29 insertions(+), 15 deletions(-) diff --git a/Completion/Unix/Command/_git b/Completion/Unix/Command/_git index 1097611..f08c35d 100644 --- a/Completion/Unix/Command/_git +++ b/Completion/Unix/Command/_git @@ -2466,8 +2466,6 @@ _git-send-email () { '*:file:_files' && ret=0 } -# TODO: -h, -H, and --help are undocumented. -# TODO: -V and --version are undocumented. # TODO: --minimize-connections is undocumented. # TODO: --remote is undocumented. # TODO: --log-window-size is undocumented. @@ -2480,7 +2478,6 @@ _git-send-email () { # TODO: migrate is undocumented. # TODO: --minimize for migrate is undocumented. # TODO: -r, --color, --pager, and --non-recursive for log are undocumented. -# TODO: --local for rebase is undocumented. # TODO: --message, -m, --file, -F, --revision, and -r for commit-diff are # undocumented. (( $+functions[_git-svn] )) || @@ -2504,11 +2501,19 @@ _git-svn () { 'clone:same as init, followed by fetch' 'rebase:fetch revs from SVN parent of HEAD and rebase current work on it' 'dcommit:commit diffs from given head onto SVN repository' + 'branch:create a branch in the SVN repository' + 'tag:create a tag in the SVN repository' 'log:output SVN log-messages' + 'blame:show what revision and author last modified each line of a file:' 'find-rev:output git commit corresponding to the given SVN revision'\''s hash' 'set-tree:commit given commit or tree to SVN repository' - 'show-ignore:output corresponding .gitignore file of svn:ignore' - 'commit-diff:commit diff of two tree-ishs') + 'create-ignore:recursively finds the svn:ignore property and creates .gitignore files' + 'show-ignore:output corresponding toplevel .gitignore file of svn:ignore' + 'commit-diff:commit diff of two tree-ishs' + 'info:show information about a file or directory' + 'proplist:list the SVN properties stored for a file or directory' + 'propget:get a given SVN property for a file' + 'show-externals:show the subversion externals') _describe -t commands command commands && ret=0 ;; (options) @@ -2546,10 +2551,13 @@ _git-svn () { '(-T --trunk)'{-T-,--trunk=}'[set trunk sub-directory]:trunk sub-directory:->subdirectory' '(-t --tags)'{-t-,--tags=}'[set tags sub-directory]:tags sub-directory:->subdirectory' '(-b --branches)'{-b-,--branches=}'[set branches sub-directory]:branches sub-directory:->subdirectory' + '--stdlayout[shorthand for setting trunk,tags,branches as relative paths, the SVN default]' '--no-metadata[set svn-remote.X.noMetadata]' '--use-svm-props[set svn-remote.X.useSvmProps]' '--use-svnsync-props[set svn-remote.X.useSvnsyncProps]' '--rewrite-root=[set svn-remote.X.rewriteRoot]:new root' + '--use-log-author[use author from the first From: or Signed-Off-By: line, when fetching into git]' + '--add-author-from[when committing to svn, append a From: line based on the git commit'\''s author string]' '--prefix=[prefix to use for names of remotes]:path prefix:_directories -r ""') fi @@ -2562,8 +2570,7 @@ _git-svn () { '(-C --copy-similarity)'{-C-,--copy-similarity=}'[undocumented]:number') fi - # FIXME: What arguments does clone actually take here? - if [[ $line[1] == (fetch|clone) ]]; then + if [[ $line[1] == (fetch|clone|log|create-ignore|info|propget|proplist|show-externals) ]]; then arguments+=( '(-r --revision)'{-r,--revision}'[only fetch given revision or revision range]:revision:->__git_svn_revisions' '::svn remote:__git_svn-remotes') @@ -2571,7 +2578,8 @@ _git-svn () { if [[ $line[1] == (dcommit|rebase) ]]; then arguments+=( - '(-m --merge)'{-m,--merge}'[use merging strategies, if necessary]') + '(-m --merge)'{-m,--merge}'[use merging strategies, if necessary]' + '*'{-s,--strategy=-}'[use given merge strategy]:merge strategy:__git_merge_strategies') fi if [[ $line[1] == (fetch|dcommit|rebase) ]]; then @@ -2579,11 +2587,6 @@ _git-svn () { '(--fetch-all --all)'{--fetch-all,--all}'[undocumented]') fi - if [[ $line[1] == (dcommit|rebase) ]]; then - arguments+=( - '*'{-s,--strategy=-}'[use given merge strategy]:merge strategy:__git_merge_strategies') - fi - if [[ $line[1] == (dcommit|log|rebase) ]]; then arguments+=( '(-v --verbose)'{-v,--verbose}'[output extra information]') @@ -2603,7 +2606,14 @@ _git-svn () { ;; (dcommit) arguments+=( - '(-n --dry-run)'{-n,--dry-run}'[output git-commands that would show diffs that would be committed]') + '(-n --dry-run)'{-n,--dry-run}'[output git-commands that would show diffs that would be committed]' + '--no-rebase[do not rebase or reset after committing]' + '--commit-url[commit to a different SVN url]:SVN URL:_url') + ;; + (branch) + arguments+=( + '(-m --message)'{-m,--message}'[specify the commit message]:message' + '(-t --tag)'{-t,--tag}'[create a tag]') ;; (migrate) arguments+=( @@ -2623,9 +2633,13 @@ _git-svn () { '--pager[undocumented]:pager:_files -g *(*)' '--non-recursive[undocumented]') ;; + (blame) + arguments+=( + '--git-format[produce output in git-blame format, with SVN revision numbers instead of git commit hashes]') + ;; (rebase) arguments+=( - '--local[undocumented]') + '--local[do not fetch remotely, rebase against the last fetched commit from SVN]') ;; (commit-diff) arguments+=( -- 1.6.0.1