From abb32da0e76791dbf4aff9758caf10579b3035cb Mon Sep 17 00:00:00 2001 From: Frank Terbeck Date: Fri, 5 Apr 2013 19:54:03 +0200 Subject: 31221: Handle zero defined aliases better --- Completion/Unix/Command/_git | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'Completion/Unix/Command/_git') diff --git a/Completion/Unix/Command/_git b/Completion/Unix/Command/_git index 2b6a36956..32d139acb 100644 --- a/Completion/Unix/Command/_git +++ b/Completion/Unix/Command/_git @@ -4757,7 +4757,13 @@ __git_aliases () { (( $+functions[__git_extract_aliases] )) || __git_extract_aliases () { - aliases=(${^${${(0)"$(_call_program aliases "git config -z --get-regexp '^alias.'")"}#alias.}/$'\n'/:alias for \'}\') + local -a tmp + tmp=(${${(0)"$(_call_program aliases "git config -z --get-regexp '^alias.'")"}#alias.}) + if (( ${#tmp} > 0 )); then + aliases=(${^tmp/$'\n'/:alias for \'}\') + else + aliases=() + fi } (( $+functions[__git_date_formats] )) || -- cgit v1.2.3 From cc7437bf2fa92059564da2e2513980e9c5f687fa Mon Sep 17 00:00:00 2001 From: Torstein Hegge Date: Sun, 17 Mar 2013 13:35:25 +0100 Subject: 31159: git: Pass prefix filter to ls-files even if it matches no files When a branch or tag name is completed with zsh in a large git repo, the completion is slow if the given prefix doesn't match a file or directory in the current working directory. Testing with linux.git, which contains release tags like v3.9 and a directory virt/: git log v takes about 0.5 seconds, while git log v3 takes about 25 seconds. (Timed using zsh 4.3.17, on a fairly slow cpu. zsh from git appears to be quite a bit faster, but the difference between completing v and v3 is still large.) The difference between the two is that v passes the result of v* to git ls-files while v3 determines that v3* matches no files, and passes an empty prefix to git ls-files. So git ls-files lists all files in the repo and passes that on to _multi_parts. Making git do the expansion of the * after the prefix lets git ls-files v3* return an empty list, making _multi_parts job easier. This does not affect the behavior of git log , but improves the performance of partial tag and branch tab-completion in the common case where file names and tag/branch names don't overlap. --- ChangeLog | 5 +++++ Completion/Unix/Command/_git | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) (limited to 'Completion/Unix/Command/_git') diff --git a/ChangeLog b/ChangeLog index d5ced53d0..7987e8293 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2013-04-20 Torstein Hegge + + * 31159: Completion/Unix/Command/_git: git: Pass prefix filter to + ls-files even if it matches no files + 2013-04-20 Jun T * 31281: Completion/Unix/Command/_du: _du: add support for Mac OS diff --git a/Completion/Unix/Command/_git b/Completion/Unix/Command/_git index 32d139acb..a76877180 100644 --- a/Completion/Unix/Command/_git +++ b/Completion/Unix/Command/_git @@ -5345,7 +5345,7 @@ __git_files () { # TODO: --directory should probably be added to $opts when --others is given. local pref=$gitcdup$gitprefix$PREFIX - files=(${(0)"$(_call_program files git ls-files -z --exclude-standard $opts -- ${pref:+$pref\*} 2>/dev/null)"}) + files=(${(0)"$(_call_program files git ls-files -z --exclude-standard $opts -- ${pref:+$pref\\\*} 2>/dev/null)"}) __git_command_successful $pipestatus || return # _wanted $tag expl $description _files -g '{'${(j:,:)files}'}' $compadd_opts - -- cgit v1.2.3 From d1a3075293be436d557acb6ac123c100f9d30e4c Mon Sep 17 00:00:00 2001 From: Ramkumar Ramachandra Date: Sat, 20 Apr 2013 18:26:11 +0530 Subject: 31286: _git: add a couple of browsers Add google-chrome/chromium to the list of builtinbrowsers in __git_browsers (). Signed-off-by: Ramkumar Ramachandra --- ChangeLog | 5 +++++ Completion/Unix/Command/_git | 2 ++ 2 files changed, 7 insertions(+) (limited to 'Completion/Unix/Command/_git') diff --git a/ChangeLog b/ChangeLog index 7987e8293..ac2de8d5c 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2013-04-21 Ramkumar Ramachandra + + * 31286: Completion/Unix/Command/_git: _git: add a couple of + browsers + 2013-04-20 Torstein Hegge * 31159: Completion/Unix/Command/_git: git: Pass prefix filter to diff --git a/Completion/Unix/Command/_git b/Completion/Unix/Command/_git index a76877180..a7d1bda8a 100644 --- a/Completion/Unix/Command/_git +++ b/Completion/Unix/Command/_git @@ -5902,6 +5902,8 @@ __git_browsers () { builtinbrowsers=( firefox iceweasel + google-chrome + chromium konquerer w3m links -- cgit v1.2.3 From cbdedcfbfe6d6cd2320ce185ded5c8b2596b61db Mon Sep 17 00:00:00 2001 From: Ramkumar Ramachandra Date: Sat, 20 Apr 2013 18:26:13 +0530 Subject: 31289: _git: branch.*.pushremote, remote.pushdefault The configuration variables branch.*.pushremote and remote.pushdefault are relatively new, and are currently not completed by ZSH. Fix this. Signed-off-by: Ramkumar Ramachandra --- ChangeLog | 3 +++ Completion/Unix/Command/_git | 2 ++ 2 files changed, 5 insertions(+) (limited to 'Completion/Unix/Command/_git') diff --git a/ChangeLog b/ChangeLog index ac2de8d5c..0f29fe5f7 100644 --- a/ChangeLog +++ b/ChangeLog @@ -3,6 +3,9 @@ * 31286: Completion/Unix/Command/_git: _git: add a couple of browsers + * 31289: Completion/Unix/Command/_git: _git: branch.*.pushremote, + remote.pushdefault + 2013-04-20 Torstein Hegge * 31159: Completion/Unix/Command/_git: git: Pass prefix filter to diff --git a/Completion/Unix/Command/_git b/Completion/Unix/Command/_git index a7d1bda8a..5d0f8c5a8 100644 --- a/Completion/Unix/Command/_git +++ b/Completion/Unix/Command/_git @@ -1719,6 +1719,7 @@ _git-config () { 'branch.*.remote:what remote git fetch and git push should fetch form/push to::__git_remotes' 'branch.*.merge:default refspec to be marked for merging::__git_ref_specs' 'branch.*.mergeoptions:default options for merging::->branch.mergeoptions' + 'branch.*.pushremote:what remote git push should push to::__git_remotes' 'branch.*.rebase:rebase on top of fetched branch::->bool:false' 'browser.*.cmd:browser command to use:browser:_path_commands' 'browser.*.path:path to use for the browser:absolute browser path:_files -g "*(*)"' @@ -1933,6 +1934,7 @@ _git-config () { receive.denyCurrentBranch:'deny a ref update of currently checked out branch::->receive.denyCurrentBranch' receive.denyNonFastForwards:'deny a ref update that is not a fast-forward::->bool:false' receive.updateserverinfo:'run git update-server-info after receiving data::->bool:false' + 'remote.pushdefault:URL of a remote repository to pushto::__git_any_repositories' 'remote.*.url:URL of a remote repository::__git_any_repositories' 'remote.*.pushurl:push URL of a remote repository::__git_any_repositories' 'remote.*.proxy:URL of proxy to use for a remote repository::_urls' -- cgit v1.2.3 From 2ea9cd47752de9bd5b791c9394b3f625a35db3c2 Mon Sep 17 00:00:00 2001 From: Ramkumar Ramachandra Date: Sat, 20 Apr 2013 18:26:12 +0530 Subject: 31288: _git: fix shortlog completer Currently, __git-shortlog () says that 'git shortlog' can only accept commits as arguments (probably because the official documentation says this). This is entirely untrue: shortlog can accept commit-range-or-file, just like log can. Fix the completer by copying out segments from the __git-log () function. Signed-off-by: Ramkumar Ramachandra --- ChangeLog | 5 +++++ Completion/Unix/Command/_git | 27 ++++++++++++++++++++++++++- 2 files changed, 31 insertions(+), 1 deletion(-) (limited to 'Completion/Unix/Command/_git') diff --git a/ChangeLog b/ChangeLog index 0f29fe5f7..b91d85ca8 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2013-04-25 Ramkumar Ramachandra + + * 31288: Completion/Unix/Command/_git: _git: fix shortlog + completer + 2013-04-21 Ramkumar Ramachandra * 31286: Completion/Unix/Command/_git: _git: add a couple of diff --git a/Completion/Unix/Command/_git b/Completion/Unix/Command/_git index 5d0f8c5a8..db59a9b75 100644 --- a/Completion/Unix/Command/_git +++ b/Completion/Unix/Command/_git @@ -1298,7 +1298,8 @@ _git-shortlog () { '(-e --email)'{-e,--email}'[show email addres of each author]' \ '-w-[linewrap the output]:: :->wrap' \ $revision_options \ - '*: :__git_commits' && ret=0 + '(-)--[start file arguments]' \ + '*:: :->commit-range-or-file' && ret=0 case $state in (wrap) @@ -1314,6 +1315,30 @@ _git-shortlog () { __git_guard_number 'line width' fi ;; + (commit-range-or-file) + case $CURRENT in + (1) + if [[ -n ${opt_args[(I)--]} ]]; then + __git_cached_files && ret=0 + else + _alternative \ + 'commit-ranges::__git_commit_ranges' \ + 'cached-files::__git_cached_files' && ret=0 + fi + ;; + (*) + # TODO: Write a wrapper function that checks whether we have a + # committish range or comittish and calls __git_tree_files + # appropriately. + if __git_is_committish_range $line[1]; then + __git_tree_files ${PREFIX:-.} $(__git_committish_range_last $line[1]) && ret=0 + elif __git_is_committish $line[1]; then + __git_tree_files ${PREFIX:-.} $line[1] && ret=0 + else + __git_cached_files && ret=0 + fi + ;; + esac esac return ret -- cgit v1.2.3 From a4245da9998029e27d8ab58f1fb350a499b04983 Mon Sep 17 00:00:00 2001 From: Luka Perkov Date: Fri, 6 Sep 2013 02:01:14 +0200 Subject: 31702: check for git rebase -i for autosquash --- ChangeLog | 3 +++ Completion/Unix/Command/_git | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) (limited to 'Completion/Unix/Command/_git') diff --git a/ChangeLog b/ChangeLog index 0e8809ad3..094956989 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,8 @@ 2013-09-06 Peter Stephenson + * Luka Perkov: 31702: Completion/Unix/Command/_git: + check for presence of "-i" when checking for "--interactive". + * 31706: Src/builtin.c, Test/C02cond.ztst: standardise handling of "test ! ". diff --git a/Completion/Unix/Command/_git b/Completion/Unix/Command/_git index db59a9b75..144869836 100644 --- a/Completion/Unix/Command/_git +++ b/Completion/Unix/Command/_git @@ -1182,7 +1182,7 @@ _git-push () { _git-rebase () { local -a autosquash_opts - if (( words[(I)--interactive] )); then + if (( words[(I)-i|--interactive] )); then autosquash_opts=( '( --no-autosquash)--autosquash[check for auto-squash boundaries]' '(--autosquash )--no-autosquash[do not check for auto-squash boundaries]') -- cgit v1.2.3 From c7213566462e2a7279e19a22027fa23b21c8e722 Mon Sep 17 00:00:00 2001 From: Luka Perkov Date: Sat, 7 Sep 2013 02:01:03 +0200 Subject: 31708: _git: add --fixup and --squash options to commit Signed-off-by: Luka Perkov --- ChangeLog | 5 +++++ Completion/Unix/Command/_git | 2 ++ 2 files changed, 7 insertions(+) (limited to 'Completion/Unix/Command/_git') diff --git a/ChangeLog b/ChangeLog index 094956989..b8302c199 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2013-09-07 Luka Perkov + + * 31708: Completion/Unix/Command/_git: _git: add --fixup and + --squash options to commit + 2013-09-06 Peter Stephenson * Luka Perkov: 31702: Completion/Unix/Command/_git: diff --git a/Completion/Unix/Command/_git b/Completion/Unix/Command/_git index 144869836..a24069a0e 100644 --- a/Completion/Unix/Command/_git +++ b/Completion/Unix/Command/_git @@ -591,6 +591,8 @@ _git-commit () { # TODO: --interactive isn’t explicitly listed in the documentation. _arguments -w -S -s \ '(-a --all --interactive -o --only -i --include *)'{-a,--all}'[stage all modified and deleted paths]' \ + '--fixup=[construct a commit message for use with rebase --autosquash]:' \ + '--squash=[construct a commit message for use with rebase --autosquash]:' \ $reset_author_opt \ '( --porcelain --dry-run)--short[output dry run in short format]' \ '(--short --dry-run)--porcelain[output dry run in porcelain-ready format]' \ -- cgit v1.2.3 From 075ad840d60de2d794aea81f2ba2eb2a5473bca4 Mon Sep 17 00:00:00 2001 From: Luka Perkov Date: Sat, 14 Sep 2013 01:34:13 +0200 Subject: 31726: _git: add few more arguments for cherry-pick and revert Signed-off-by: Luka Perkov --- ChangeLog | 3 +++ Completion/Unix/Command/_git | 6 ++++++ 2 files changed, 9 insertions(+) (limited to 'Completion/Unix/Command/_git') diff --git a/ChangeLog b/ChangeLog index 008e85500..286c4037a 100644 --- a/ChangeLog +++ b/ChangeLog @@ -3,6 +3,9 @@ * 31723: Completion/Unix/Command/_systemd: _systemd: add more system commands + * 31726: Completion/Unix/Command/_git: _git: add few more + arguments for cherry-pick and revert + 2013-09-10 Barton E. Schaefer * 31714: Completion/Zsh/Command/_cd: handle ".." properly when diff --git a/Completion/Unix/Command/_git b/Completion/Unix/Command/_git index a24069a0e..98080403a 100644 --- a/Completion/Unix/Command/_git +++ b/Completion/Unix/Command/_git @@ -464,6 +464,9 @@ _git-checkout () { (( $+functions[_git-cherry-pick] )) || _git-cherry-pick () { _arguments \ + '(- :)--quit[end revert or cherry-pick sequence]' \ + '(- :)--continue[resume revert or cherry-pick sequence]' \ + '(- :)--abort[cancel revert or cherry-pick sequence]' \ '(-e --edit --ff)'{-e,--edit}'[edit commit before committing the revert]' \ '(--ff)-x[append information about what commit was cherry-picked]' \ '(-m --mainline)'{-m,--mainline}'[specify mainline when cherry-picking a merge commit]:parent number' \ @@ -1248,6 +1251,9 @@ _git-reset () { (( $+functions[_git-revert] )) || _git-revert () { _arguments -w -S -s \ + '(- :)--quit[end revert or cherry-pick sequence]' \ + '(- :)--continue[resume revert or cherry-pick sequence]' \ + '(- :)--abort[cancel revert or cherry-pick sequence]' \ '(-e --edit --no-edit)'{-e,--edit}'[edit the commit before committing the revert]' \ '(-m --mainline)'{-m+,--mainline=}'[pick which parent is mainline]:parent number' \ '(-e --edit)--no-edit[do not edit the commit message]' \ -- cgit v1.2.3 From 5f427b8245c783d6027af4720fd407f0b90e5c81 Mon Sep 17 00:00:00 2001 From: m0viefreak Date: Sun, 22 Sep 2013 12:48:15 +0200 Subject: 31741: _git: fix a wrong variable in __git_config_values This probably was a copy/paste mistake. --- ChangeLog | 5 +++++ Completion/Unix/Command/_git | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) (limited to 'Completion/Unix/Command/_git') diff --git a/ChangeLog b/ChangeLog index 148aef5cb..eecc0febe 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2013-09-22 m0viefreak + + * 31741: Completion/Unix/Command/_git: _git: fix a wrong variable + in __git_config_values + 2013-09-21 Barton E. Schaefer * unposted: Src/glob.c: improve an error message. diff --git a/Completion/Unix/Command/_git b/Completion/Unix/Command/_git index 98080403a..0697e3c7b 100644 --- a/Completion/Unix/Command/_git +++ b/Completion/Unix/Command/_git @@ -5920,7 +5920,7 @@ __git_config_values () { default=$2 shift 2 values=($*) - [[ -n $current ]] && values[(r)$(__git_pattern_escape $default):*]+=' (current)' + [[ -n $current ]] && values[(r)$(__git_pattern_escape $current):*]+=' (current)' values[(r)$(__git_pattern_escape $default):*]+=' (default)' _describe -t ${opts[-t]:-values} ${opts[-l]:-value} values -- cgit v1.2.3 From 2813d8aa9889b609b92449124fd2444afc6c912e Mon Sep 17 00:00:00 2001 From: m0viefreak Date: Sun, 22 Sep 2013 12:48:16 +0200 Subject: 31743: _git: fix usage of ->int: for some entries in _git-config --- ChangeLog | 3 +++ Completion/Unix/Command/_git | 18 +++++++++--------- 2 files changed, 12 insertions(+), 9 deletions(-) (limited to 'Completion/Unix/Command/_git') diff --git a/ChangeLog b/ChangeLog index eecc0febe..ca416d284 100644 --- a/ChangeLog +++ b/ChangeLog @@ -3,6 +3,9 @@ * 31741: Completion/Unix/Command/_git: _git: fix a wrong variable in __git_config_values + * 31743: Completion/Unix/Command/_git: _git: fix usage of ->int: + for some entries in _git-config + 2013-09-21 Barton E. Schaefer * unposted: Src/glob.c: improve an error message. diff --git a/Completion/Unix/Command/_git b/Completion/Unix/Command/_git index 0697e3c7b..faa8df889 100644 --- a/Completion/Unix/Command/_git +++ b/Completion/Unix/Command/_git @@ -1829,7 +1829,7 @@ _git-config () { format.signoff:'enable --signoff by default::->bool:false' 'gc.*.reflogexpire:grace period for git reflog expire::->days:90' 'gc.*.reflogexpireunreachable:grace period for git reflog expire for unreachable entries::->days:30' - gc.aggressiveWindow:'window size used in delta compression algorithm:->int:250' + gc.aggressiveWindow:'window size used in delta compression algorithm::->int:250' gc.auto:'minimum limit for packing loose objects with --auto::->int:6700' gc.autopacklimit:'minimum limit for packing packs with --auto::->int:50' gc.packrefs:'allow git gc to run git pack-refs::->gc.packrefs:true' @@ -1856,8 +1856,8 @@ _git-config () { 'gitcvs.*.dbTableNamePrefix:database table name prefix:prefix:->string' gitcvs.usecrlfattr:'use end-of-line conversion attributes::->bool:false' gitcvs.allbinary:'treat all files from CVS as binary::->bool:false' - gui.commitmsgwidth:'width of commit message window:width:->int:75' - gui.diffcontext:'number of context lines used in diff window:context:->int:5' + gui.commitmsgwidth:'width of commit message window:width::->int:75' + gui.diffcontext:'number of context lines used in diff window:context::->int:5' gui.encoding:'encoding to use for displaying file contents::->encoding' gui.matchtrackingbranch:'create branches that track remote branches::->bool:false' gui.newbranchtemplate:'suggested name for new branches:template:->string' @@ -1887,8 +1887,8 @@ _git-config () { http.sslCertPasswordProtected:'prompt for a password for the SSL certificate::->bool:false' http.sslCAInfo:'file containing CA certificates to verify against for HTTPS:CA certificates file:_files' http.sslCAPath:'directory containing files with CA certificates to verify against for HTTPS:CA certificates directory:_directories' - http.maxRequests:'how many HTTP requests to launch in parallel:maximum number of requests:->int:5' - http.minSessions:'number of curl sessions to keep across requests:mininmum number of sessions:->int:1' + http.maxRequests:'how many HTTP requests to launch in parallel:maximum number of requests::->int:5' + http.minSessions:'number of curl sessions to keep across requests:mininmum number of sessions::->int:1' http.postBuffer:'maximum size of buffer used by smart HTTP transport when POSTing:maximum POST buffer size:->bytes:1m' http.lowSpeedLimit:'lower limit for HTTP transfer-speed:low transfer-speed limit:->int' http.lowSpeedTime:'duration for http.lowSpeedLimit:time:->int' @@ -1945,12 +1945,12 @@ _git-config () { notes.rewrite.rebase:'copy notes from original to rewritten commit when running git rebase::->bool:true' notes.rewriteMode:'what to do when target commit already has a not when rewriting::->notes.rewriteMode' notes.rewriteRef:'refname to use when rewriting::->refname' - pack.window:'size of window:window size:->int:10' - pack.depth:'maximum delta depth:maximum delta depth:->int:50' + pack.window:'size of window:window size::->int:10' + pack.depth:'maximum delta depth:maximum delta depth::->int:50' pack.windowMemory:'window size limit:maximum window size:->bytes:0' pack.compression:'compression level::->compression:-1' pack.deltaCacheSize:'maximum amount of memory for caching deltas:maximum delta cache size:->bytes:256m' - pack.deltaCacheLimit:'maximum size of deltas:maximum delta size:->int:1000' + pack.deltaCacheLimit:'maximum size of deltas:maximum delta size::->int:1000' pack.threads:'number of threads to use for searching for best delta matches:number of threads:->int' pack.indexVersion:'default pack index version:index version:->string' pack.packSizeLimit:'maximum size of packs:maximum size of packs:->bytes' @@ -2055,7 +2055,7 @@ _git-config () { 'svn-remote.*.branches:branch mappings:branch mapping:->string' 'svn-remote.*.tags:tag mappings:tag mapping:->string' tar.umask:'umask to apply::->umask' - transfer.unpackLimit:'default value for fetch.unpackLimit and receive.unpackLimit:unpack limit:->int:100' + transfer.unpackLimit:'default value for fetch.unpackLimit and receive.unpackLimit:unpack limit::->int:100' 'url.*.insteadOf:string to start URLs with:prefix:->string' 'url.*.pushInsteadOf:string to start URLs to push to with:prefix:->string' user.email:'email address used for commits::_email_addresses' -- cgit v1.2.3 From ef4157fac4657337d491ca1d3ea92f195bf191d8 Mon Sep 17 00:00:00 2001 From: m0viefreak Date: Sun, 22 Sep 2013 12:48:17 +0200 Subject: 31744: _git: make git submodule completion work The -A parameter in the main completion stopped completion in the subcommands from working. Remove it. --- ChangeLog | 3 +++ Completion/Unix/Command/_git | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) (limited to 'Completion/Unix/Command/_git') diff --git a/ChangeLog b/ChangeLog index ca416d284..feb98eb28 100644 --- a/ChangeLog +++ b/ChangeLog @@ -6,6 +6,9 @@ * 31743: Completion/Unix/Command/_git: _git: fix usage of ->int: for some entries in _git-config + * 31744: Completion/Unix/Command/_git: _git: make git submodule + completion work + 2013-09-21 Barton E. Schaefer * unposted: Src/glob.c: improve an error message. diff --git a/Completion/Unix/Command/_git b/Completion/Unix/Command/_git index faa8df889..0f4ead334 100644 --- a/Completion/Unix/Command/_git +++ b/Completion/Unix/Command/_git @@ -1491,7 +1491,7 @@ _git-submodule () { local curcontext=$curcontext state line ret=1 declare -A opt_args - _arguments -C -A '-*' \ + _arguments -C \ '(-q --quiet)'{-q,--quiet}'[suppress all output]' \ ': :->command' \ '*:: :->option-or-argument' && ret=0 -- cgit v1.2.3 From 06d58592ab2cb4f1d0f01f79eed7d9a0b963a59e Mon Sep 17 00:00:00 2001 From: m0viefreak Date: Sun, 22 Sep 2013 12:48:18 +0200 Subject: 31745: _git: correctly use __git_guard_number in some cases The space is relevant to make the help text work as intended. --- ChangeLog | 3 +++ Completion/Unix/Command/_git | 10 +++++----- 2 files changed, 8 insertions(+), 5 deletions(-) (limited to 'Completion/Unix/Command/_git') diff --git a/ChangeLog b/ChangeLog index feb98eb28..4cef4ca4a 100644 --- a/ChangeLog +++ b/ChangeLog @@ -9,6 +9,9 @@ * 31744: Completion/Unix/Command/_git: _git: make git submodule completion work + * 31745: Completion/Unix/Command/_git: _git: correctly use + __git_guard_number in some cases + 2013-09-21 Barton E. Schaefer * unposted: Src/glob.c: improve an error message. diff --git a/Completion/Unix/Command/_git b/Completion/Unix/Command/_git index 0f4ead334..6797f9c49 100644 --- a/Completion/Unix/Command/_git +++ b/Completion/Unix/Command/_git @@ -850,7 +850,7 @@ _git-grep () { '(-a --text)'{-a,--text}'[process binary files as if they were text]' \ '(-i --ignore-case)'{-i,--ignore-case}'[ignore case when matching]' \ '-I[do not match pattern in binary files]' \ - '--max-depth=[descend at most given levels of directories]:__git_guard_number depth' \ + '--max-depth=[descend at most given levels of directories]: :__git_guard_number depth' \ '(-w --word-regexp)'{-w,--word-regexp}'[match only whole words]' \ '(-v --invert-match)'{-v,--invert-match}'[select non-matching lines]' \ '( -H)-h[supress output of filenames]' \ @@ -2548,7 +2548,7 @@ _git-config () { (umask) _alternative \ 'values:value:(user)' \ - 'umasks::__git_guard_number umask' && ret=0 + 'umasks: :__git_guard_number umask' && ret=0 ;; esac ;; @@ -2910,12 +2910,12 @@ _git-blame () { (line-range) if compset -P '([[:digit:]]#|/[^/]#(\\?[^/]#)#/),'; then _alternative \ - 'line-numbers::__git_guard_number "line number"' \ + 'line-numbers: :__git_guard_number "line number"' \ 'regexes::_guard "(/[^/]#(\\?[^/]#)#(/|)|)" regex' \ 'offsets::_guard "([+-][[:digit:]]#|)" "line offset"' && ret=0 else _alternative \ - 'line-numbers::__git_guard_number "line number"' \ + 'line-numbers: :__git_guard_number "line number"' \ 'regexes::_guard "(/[^/]#(\\?[^/]#)#(/|)|)" regex' && ret=0 fi ;; @@ -3150,7 +3150,7 @@ _git-show-branch () { (limit-and-base) if compset -P '[[:digit:]]##,'; then _alternative \ - 'counts::__git_guard_number count' \ + 'counts: :__git_guard_number count' \ 'dates::__git_datetimes' && ret=0 else __git_guard_number limit -- cgit v1.2.3 From f20ba1a51e1aecbae61a5169119638df13cf475e Mon Sep 17 00:00:00 2001 From: m0viefreak Date: Sun, 22 Sep 2013 12:48:19 +0200 Subject: 31755: _git: completion updates to match latest git v1.8.3 --- ChangeLog | 3 + Completion/Unix/Command/_git | 250 ++++++++++++++++++++++++++++++++----------- 2 files changed, 189 insertions(+), 64 deletions(-) (limited to 'Completion/Unix/Command/_git') diff --git a/ChangeLog b/ChangeLog index 4cef4ca4a..c16198ffe 100644 --- a/ChangeLog +++ b/ChangeLog @@ -12,6 +12,9 @@ * 31745: Completion/Unix/Command/_git: _git: correctly use __git_guard_number in some cases + * 31755: Completion/Unix/Command/_git: _git: completion updates to + match latest git v1.8.3 + 2013-09-21 Barton E. Schaefer * unposted: Src/glob.c: improve an error message. diff --git a/Completion/Unix/Command/_git b/Completion/Unix/Command/_git index 6797f9c49..867bd67d4 100644 --- a/Completion/Unix/Command/_git +++ b/Completion/Unix/Command/_git @@ -277,12 +277,13 @@ _git-bisect () { (( $+functions[_git-branch] )) || _git-branch () { - declare l c m d + declare l c m d e - l='--color --no-color -r -a -v --verbose --abbrev --no-abbrev' - c='-l -f --force -t --track --no-track --set-upstream --contains --merged --no-merged' - m='-m -M' - d='-d -D' + l='--color --no-color -r -a -v --verbose --abbrev --no-abbrev --list' + c='-l -f --force -t --track --no-track -u --set-upstream --set-upstream-to --unset-upstream --contains --merged --no-merged' + m='-m --move -M' + d='-d --delete -D' + e='--edit-description' declare -a dependent_creation_args if (( words[(I)-r] == 0 )); then @@ -312,27 +313,31 @@ _git-branch () { fi _arguments -w -S -s \ - "($c $m $d --no-color :)--color=-[turn on branch coloring]:: :__git_color_whens" \ - "($c $m $d : --color)--no-color[turn off branch coloring]" \ - "($c $m -a)-r[list or delete only remote-tracking branches]" \ - "($c $m $d : -r)-a[list both remote-tracking branches and local branches]" \ - "($c $m $d : -v --verbose)"{-v,--verbose}'[show SHA1 and commit subject line for each head]' \ - "($c $m $d :)--abbrev=[set minimum SHA1 display-length]: :__git_guard_number length" \ - "($c $m $d :)--no-abbrev[do not abbreviate sha1s]" \ - "($l $m $d)-l[create the branch's reflog]" \ - "($l $m $d -f --force)"{-f,--force}"[force the creation of a new branch]" \ - "($l $m $d -t --track)"{-t,--track}"[set up configuration so that pull merges from the start point]" \ - "($l $m $d)--no-track[override the branch.autosetupmerge configuration variable]" \ - "($l $m $d)--set-upstream[set up configuration so that pull merges]" \ - "($l $m $d)--contains=[only list branches which contain the specified commit]: :__git_committishs" \ - "($l $m $d)--merged=[only list branches which are fully contained by HEAD]: :__git_committishs" \ - "($l $m $d)--no-merged=[do not list branches which are fully contained by HEAD]: :__git_committishs" \ + "($c $m $d $e --no-color :)--color=-[turn on branch coloring]:: :__git_color_whens" \ + "($c $m $d $e : --color)--no-color[turn off branch coloring]" \ + "($c $m $d $e )*--list[list only branches matching glob]:pattern" \ + "($c $m $e -a)-r[list or delete only remote-tracking branches]" \ + "($c $m $d $e: -r)-a[list both remote-tracking branches and local branches]" \ + "($c $m $d $e : -v --verbose)"{-v,--verbose}'[show SHA1 and commit subject line for each head]' \ + "($c $m $d $e :)--abbrev=[set minimum SHA1 display-length]: :__git_guard_number length" \ + "($c $m $d $e :)--no-abbrev[do not abbreviate sha1s]" \ + "($l $m $d $e)-l[create the branch's reflog]" \ + "($l $m $d $e -f --force)"{-f,--force}"[force the creation of a new branch]" \ + "($l $m $d $e -t --track)"{-t,--track}"[set up configuration so that pull merges from the start point]" \ + "($l $m $d $e)--no-track[override the branch.autosetupmerge configuration variable]" \ + "($l $m $d $e -u --set-upstream --set-upstream-to --unset-upstream)"{-u,--set-upstream-to=}"[set up configuration so that pull merges]:remote-branches:__git_remote_branch_names" \ + "($l $m $d $e -u --set-upstream --set-upstream-to --unset-upstream)--unset-upstream[remove upstream configuration]" \ + "($l $m $d $e)--contains=[only list branches which contain the specified commit]: :__git_committishs" \ + "($l $m $d $e)--merged=[only list branches which are fully contained by HEAD]: :__git_committishs" \ + "($l $m $d $e)--no-merged=[do not list branches which are fully contained by HEAD]: :__git_committishs" \ + "($c $l $m $d)--edit-description[edit branch description]" \ $dependent_creation_args \ - "($l $c $d -M)-m[rename a branch and the corresponding reflog]" \ - "($l $c $d -m)-M[rename a branch even if the new branch-name already exists]" \ + "($l $c $d $m $e)"{-m,--move}"[rename a branch and the corresponding reflog]" \ + "($l $c $d $m $e)-M[rename a branch even if the new branch-name already exists]" \ $dependent_modification_args \ - "($l $c $m -D)-d[delete a fully merged branch]" \ - "($l $c $m -d)-D[delete a branch]" \ + "($l $c $m $d $e)"{-d,--delete}"[delete a fully merged branch]" \ + "($l $c $m $d $e)-D[delete a branch]" \ + {-q,--quiet}"[be more quiet]" \ $dependent_deletion_args } @@ -472,6 +477,8 @@ _git-cherry-pick () { '(-m --mainline)'{-m,--mainline}'[specify mainline when cherry-picking a merge commit]:parent number' \ '(-n --no-commit --ff)'{-n,--no-commit}'[do not make the actually commit]' \ '(-s --signoff --ff)'{-s,--signoff}'[add Signed-off-by line at the end of the commit message]' \ + '*'{-s,--strategy=}'[use given merge strategy]:merge strategy:__git_merge_strategies' \ + '*'{-X,--strategy-option=}'[pass merge-strategy-specific option to merge strategy]' \ '(-e --edit -x -n --no-commit -s --signoff)--ff[fast forward, if possible]' \ ': :__git_revisions' } @@ -546,7 +553,8 @@ _git-clone () { # TODO: Argument to -b should complete branch names in the repository being # cloned. _arguments -w -C -S -s \ - '(-l --local)'{-l,--local}'[clone locally, hardlink refs and objects if possible]' \ + '(-l --local --no-local)'{-l,--local}'[clone locally, hardlink refs and objects if possible]' \ + '(-l --local --no-local)--no-local[override --local, as if file:/// URL was given]' \ '--no-hardlinks[copy files instead of hardlinking when doing a local clone]' \ '(-s --shared)'{-s,--shared}'[share the objects with the source repository (warning: see man page)]' \ '--reference[reference repository]:repository:_directories' \ @@ -560,7 +568,9 @@ _git-clone () { '(-b --branch)'{-b,--branch}'[point HEAD to the given branch]: :__git_guard_branch-name' \ '(-u --upload-pack)'{-u,--upload-pack=}'[specify path to git-upload-pack on remote side]:remote path' \ '--template=[directory to use as a template for the object database]: :_directories' \ + '*'{-c,--config}'[= set a configuration variable in the newly created repository]' \ '--depth[create a shallow clone, given number of revisions deep]: :__git_guard_number depth' \ + '--single-branch[clone only history leading up to the main branch or the one specified by -b]' \ '--recursive[initialize all contained submodules]' \ ': :->repository' \ ': :_directories' && ret=0 @@ -600,17 +610,19 @@ _git-commit () { '( --porcelain --dry-run)--short[output dry run in short format]' \ '(--short --dry-run)--porcelain[output dry run in porcelain-ready format]' \ '(--short --porcelain --dry-run -z --null)'{-z,--null}'[separate dry run entry output with NUL]' \ + '--patch[use the interactive patch selection interface to chose which changes to commit]' \ '(--reset-author)--author[override the author name used in the commit]:author name' \ '--date=[override the author date used in the commit]:date' \ '(-s --signoff)'{-s,--signoff}'[add Signed-off-by line at the end of the commit message]' \ '(-n --no-verify)'{-n,--no-verify}'[do not look for suspicious lines the commit introduces]' \ '--allow-empty[allow recording an empty commit]' \ '--allow-empty-message[allow recording a commit with an empty message]' \ - '--cleanup=[specify how the commit message should be cleaned up]:mode:((verbatim\:"don'\''t change the commit message at all" + '--cleanup=[specify how the commit message should be cleaned up]:mode:((verbatim\:"do not change the commit message at all" whitespace\:"remove leading and trailing whitespace lines" strip\:"remove both whitespace and commentary lines" default\:"act as '\''strip'\'' if the message is to be edited and as '\''whitespace'\'' otherwise"))' \ - '(-e --edit)'{-e,--edit}'[edit the commit message before committing]' \ + '(-e --edit --no-edit)'{-e,--edit}'[edit the commit message before committing]' \ + '(-e --edit --no-edit)--no-edit[do not edit the commit message before committing]' \ '(-a --all --interactive -o --only -i --include)'{-i,--include}'[update the given files and commit the whole index]' \ '(-a --all --interactive -o --only -i --include)'{-o,--only}'[commit only the given files]' \ '(-u --untracked-files)'{-u-,--untracked-files=}'[show files in untracked directories]::mode:((no\:"show no untracked files" @@ -621,6 +633,7 @@ _git-commit () { '--dry-run[only show list of paths that are to be commited or not, and any untracked]' \ '( --no-status)--status[include the output of git status in the commit message template]' \ '(--status )--no-status[do not include the output of git status in the commit message template]' \ + '(-S --gpg-sign)'{-S-,--gpg-sign=}'[GPG-sign the commit]::key id' \ '(-a --all --interactive -o --only -i --include *)--interactive[interactively update paths in the index file]' \ '*: :__git_ignore_line_inside_arguments __git_changed_files' \ - '(message)' \ @@ -793,14 +806,17 @@ _git-format-patch () { '(--thread )--no-thread[do not thread messages]' \ '--in-reply-to=[make the first mail a reply to the given message]:message id' \ '--ignore-if-in-upstream[do not include a patch that matches a commit in the given range]' \ + '(-v --reroll-count)'{-v,--reroll-count=}'[mark the series as the -th iteration of the topic]: :__git_guard_number iteration' \ '(-k --keep-subject)--subject-prefix=[use the given prefix instead of \[PATCH\]]:prefix' \ '*--to=[add To: header to email headers]: :_email_addresses' \ '*--cc=[add Cc: header to email headers]: :_email_addresses' \ '*--add-header=[add an arbitrary header to email headers]:header' \ '--cover-letter[generate a cover letter template]' \ + '--notes=[append notes for the commit after the three-dash line]:: :__git_notes_refs' \ '( --no-signature)--signature=[add a signature]:signature' \ '(--signature )--no-signature[do not add a signature]' \ '--suffix=[use the given suffix for filenames]:filename suffix' \ + '--quiet[suppress the output of the names of generated files]' \ '--no-binary[do not output contents of changes in binary files, only note that they differ]' \ '--root[treat the revision argument as a range]' \ ': :->commit-or-commit-range' && ret=0 @@ -847,6 +863,8 @@ _git-grep () { _arguments -C -A '-*' \ '(-O --open-files-in-pager --no-index)--cached[search blobs registered in index file instead of working tree]' \ '(--cached)--no-index[search files in current directory, not just treacked files]' \ + '--exclude-standard[exclude files standard ignore mechanisms]' \ + '--untracked[search in untracked files]' \ '(-a --text)'{-a,--text}'[process binary files as if they were text]' \ '(-i --ignore-case)'{-i,--ignore-case}'[ignore case when matching]' \ '-I[do not match pattern in binary files]' \ @@ -856,9 +874,10 @@ _git-grep () { '( -H)-h[supress output of filenames]' \ '(-h )-H[show filenames]' \ '--full-name[output paths relative to the project top directory]' \ - '(-E --extended-regexp -G --basic-regexp)'{-E,--extended-regexp}'[use POSIX extended regexes]' \ - '(-E --extended-regexp -G --basic-regexp)'{-G,--basic-regexp}'[use POSIX basic regexes]' \ - '(-F --fixed-strings)'{-F,--fixed-strings}'[do not interpret pattern as a regex]' \ + '(-E --extended-regexp -G --basic-regexp -P --perl-regexp -F --fixed-strings)'{-E,--extended-regexp}'[use POSIX extended regexes]' \ + '(-E --extended-regexp -G --basic-regexp -P --perl-regexp -F --fixed-strings)'{-G,--basic-regexp}'[use POSIX basic regexes]' \ + '(-E --extended-regexp -G --basic-regexp -P --perl-regexp -F --fixed-strings)'{-P,--perl-regexp}'[use perl-compatible regexes]' \ + '(-E --extended-regexp -G --basic-regexp -P --perl-regexp -F --fixed-strings)'{-F,--fixed-strings}'[do not interpret pattern as a regex]' \ '-n[prefix the line number to matching lines]' \ '(-l --files-with-matches -L --files-without-match --name-only)'{-l,--files-with-matches,--name-only}'[show only names of matching files]' \ '(-l --files-with-matches -L --files-without-match)'{-L,--files-without-match}'[show only names of non-matching files]' \ @@ -867,10 +886,13 @@ _git-grep () { '(-c --count)'{-c,--count}'[show number of matching lines in files]' \ '( --no-color)--color=-[color matches]:: :__git_color_whens' \ '(--color )---no-color[do not color matches]' \ + '--break[prefix the line number to matching lines]' \ + '--heading[show the filename above the matches]' \ '-A[show trailing context]: :__git_guard_number lines' \ '-B[show leading context]: :__git_guard_number lines' \ '-C[show context]: :__git_guard_number lines' \ '(-p --show-function)'{-p,--show-function}'[show preceding line containing function name of match]' \ + '(-W --function-context)'{-W,--function-context}'[show whole function where a match was found]' \ '(1)*-f[read patterns from given file]:pattern file:_files' \ '(1)*-e[use the given pattern for matching]:pattern' \ $pattern_operators \ @@ -984,6 +1006,7 @@ _git-init () { '--bare[create a bare repository]' \ '--template=[directory to use as a template for the object database]: :_directories' \ '--shared=[share repository amongst several users]:: :__git_repository_permissions' \ + '--separate-git-dir=[create git dir elsewhere and link it using the gitdir mechanism]:: :_directories' \ ':: :_directories' } @@ -1044,6 +1067,7 @@ _git-merge () { '-m[set the commit message to be used for the merge commit]:merge message' \ '( --no-rerere-autoupdate)--rerere-autoupdate[allow the rerere mechanism to update the index]' \ '(--rerere-autoupdate )--no-rerere-autoupdate[do not allow the rerere mechanism to update the index]' \ + '--abort[restore the original branch and abort the merge operation]' \ '*: :__git_commits' } @@ -1090,6 +1114,7 @@ _git-notes () { copy:'copy notes from one object to another' append:'append notes to a given object' edit:'edit notes for a given object' + merge:'merge the given notes ref into the current ref' show:'show notes for a given object' remove:'remove notes for a given object' prune:'remove all notes for non-existing/unreachable objects') @@ -1124,6 +1149,15 @@ _git-notes () { ': :__git_commits' \ ': :__git_commits' && ret=0 ;; + (merge) + _arguments -w -S -s \ + '(-s --strategy)--abort[abort an in-progress notes merge]' \ + '(-s --strategy)--commit[finalize an in-progress notes merge]' \ + {-q,--quiet}'[be quiet]' \ + {-v,--verbose}'[be more verbose]' \ + '(--abort --commit)'{-s,--strategy=}'[resolve conflicts using the given strategy]' \ + ': :__git_notes_refs' && ret=0 + ;; (append) _arguments -w -S -s \ '*'{-m,--message=}'[use given note message]:message' \ @@ -1165,6 +1199,7 @@ _git-push () { # later on to match the remote end. _arguments -w -S -s \ '--all[push all refs under refs/heads/]' \ + '--prune[remove remote branches that do not have a local counterpart]' \ '--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]' \ @@ -1173,12 +1208,14 @@ _git-push () { '(--receive-pack --exec)'{--receive-pack=-,--exec=-}'[path to git-receive-pack on remote]:remote git-receive-pack:_files' \ '(-f --force)'{-f,--force}'[allow refs that are not ancestors to be updated]' \ '(:)--repo=[default repository to use]:repository:__git_any_repositories' \ - '(-u --set-upstream)'{-u,--set-upstream}'[add upstream reference for each branch that is up to date or pushed]' \ + '(-u --set-upstream-to)'{-u,--set-upstream-to}'[add upstream reference for each branch that is up to date or pushed]' \ '( --no-thin)--thin[try to minimize number of objects to be sent]' \ '(--thin )--no-thin[do not try to minimize number of objects to be sent]' \ '(-q --quiet -v --verbose --progress)'{-q,--quiet}'[suppress all output]' \ '(-q --quiet -v --verbose)'{-v,--verbose}'[output additional information]' \ '(-q --quiet)--progress[output progress information]' \ + '--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"))' \ ':: :__git_any_repositories' \ '*: :__git_ref_specs' } @@ -1209,7 +1246,9 @@ _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' \ '(1)--root[rebase all reachable commits]' \ $autosquash_opts \ '--no-ff[cherry-pick all rebased commits with --interactive, otherwise synonymous to --force-rebase]' \ @@ -1254,7 +1293,6 @@ _git-revert () { '(- :)--quit[end revert or cherry-pick sequence]' \ '(- :)--continue[resume revert or cherry-pick sequence]' \ '(- :)--abort[cancel revert or cherry-pick sequence]' \ - '(-e --edit --no-edit)'{-e,--edit}'[edit the commit before committing the revert]' \ '(-m --mainline)'{-m+,--mainline=}'[pick which parent is mainline]:parent number' \ '(-e --edit)--no-edit[do not edit the commit message]' \ '(-n --no-commit)'{-n,--no-commit}'[do not commit the reversion]' \ @@ -1415,6 +1453,7 @@ _git-stash () { '( --no-keep-index)--keep-index[all changes already added to the index are left intact]' \ '(--keep-index )--no-keep-index[all changes already added to the index are undone]' \ '(-q --quiet)'{-q,--quiet}'[suppress all output]' \ + '(-u --include-untracked)'{-u,--include-untracked}'[include untracked files]' \ '::message' && ret=0 ;; (list) @@ -1504,6 +1543,7 @@ _git-submodule () { add:'add given repository as a submodule' status:'show the status of a submodule' init:'initialize a submodule' + deinit:'unregister a submodule' update:'update a submodule' summary:'show commit summary between given commit and working tree/index' foreach:'evaluate shell command in each checked-out submodule' @@ -1522,6 +1562,7 @@ _git-submodule () { '(-q --quiet)'{-q,--quiet}'[suppress all output]' \ '(-b --branch)'{-b,--branch}'[branch of repository to add as submodule]' \ '(-f --force)'{-f,--force}'[allow adding an otherwise ignored submodule path]' \ + '--name[use given name instead of defaulting to its path]:name' \ '--reference=[remote repository to clone]: :__git_any_repositories' \ ': :__git_any_repositories' \ ':: :_directories' && ret=0 @@ -1538,6 +1579,11 @@ _git-submodule () { '(-q --quiet)'{-q,--quiet}'[suppress all output]' \ '*: :__git_ignore_line_inside_arguments __git_submodules' && ret=0 ;; + (deinit) + _arguments -S \ + '(-f --force)'{-f,--force}'[remove submodule worktree even if local modifications are present]' \ + '*: :__git_ignore_line_inside_arguments __git_submodules' && ret=0 + ;; (update) # TODO: --init not properly documented. _arguments -S \ @@ -1547,6 +1593,7 @@ _git-submodule () { '--rebase[rebase current branch onto commit recorded in superproject]' \ '--reference=[remote repository to clone]: :__git_any_repositories' \ '--recursive[traverse submodules recursively]' \ + '--force[discard local changes by checking out the current up-to-date version]' \ '--init[initialize uninitialized submodules]' \ '*: :__git_ignore_line_inside_arguments __git_submodules' && ret=0 ;; @@ -1580,6 +1627,7 @@ _git-submodule () { ;; (sync) _arguments -S \ + '--recursive[traverse submodules recursively]' \ '(-q --quiet)'{-q,--quiet}'[suppress all output]' \ '*: :__git_ignore_line_inside_arguments __git_submodules' && ret=0 ;; @@ -1609,6 +1657,7 @@ _git-tag () { '(-a -u)-s[create an signed and annotated tag]' \ '(-a -s )-u[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 \ ': :__git_tags' \ ':: :__git_commits' \ @@ -1619,6 +1668,7 @@ _git-tag () { '-n+[limit line output of annotation]: :__git_guard_number "limit"' \ '-l[list tags matching pattern]' \ '--contains=[only list tags which contain the specified commit]: :__git_commits' \ + '--points-at=[only list tags of the given object]: :__git_commits' \ '::pattern' \ - verification \ '-v[verifies gpg signutare of tags]' \ @@ -1799,15 +1849,19 @@ _git-config () { color.status.untracked:'color of files not currently being tracked::->color' color.status.nobranch:'color of no-branch warning::->color' color.ui:'color output of capable git commands::->color-bool' + commit.cleanup:'default --cleanup option::->commit.cleanup:default' commit.status:'include status information in commit message template::->bool:true' commit.template:'template file for commit messages:template:_files' + diff.algorithm:'default diff algorithm::->diff.algorithm:default' diff.autorefreshindex:'run git update-index --refresh before git diff::->bool:true' + diff.context:'default number of context lines::->int:3' diff.external:'command to generate diff with:diff command:_path_commands' diff.mnemonicprefix:'use mnemonic source and destination prefixes::->bool:false' diff.noprefix:'strip source and destination prefixes::->bool:false' diff.renameLimit:'number of files to consider when detecting copy/renames:rename limit:->int' diff.renames:'try to detect renames::->diff.renames:true' diff.ignoreSubmodules:'ignore submodules::->bool:false' + diff.submodule:'output format for submodule differences::->diff.submodule:short' diff.suppressBlankEmpty:'inbihit printing space before empty output lines::->bool:false' diff.tool:'diff tool to use::__git_difftools' 'difftool.*.cmd:command to invoke for the diff tool::_path_commands' @@ -1877,7 +1931,10 @@ _git-config () { guitool.revunmerged:'show only unmerged branches in revprompt::->bool:false' guitool.title:'title of prompt dialog:prompt title:->string' guitool.prompt:'prompt to display:prompt:->string' + grep.lineNumber:'enable -n option by default::->bool:false' + grep.patternType:'default matching pattern type::->grep.patternType:default' help.browser:'browser used to display help in web format::__git_browsers' + help.htmlpath:'location of HTML help::->help.htmlpath' help.format:'default help format used by git help::->help.format' help.autocorrect:'execute corrected mistyped commands::->bool:false' http.proxy:'HTTP proxy to use:proxy:_urls' @@ -1955,8 +2012,9 @@ _git-config () { pack.indexVersion:'default pack index version:index version:->string' pack.packSizeLimit:'maximum size of packs:maximum size of packs:->bytes' pull.octopus:'default merge strategy to use when pulling multiple branches::__git_merge_strategies' + pull.rebase:'rebase branches on top of the fetched branch, instead of merging::->bool:false' pull.twohead:'default merge strategy to use when pulling a single branch::__git_merge_strategies' - push.default:'action git push should take if no refspec is given::->push.default' + push.default:'action git push should take if no refspec is given::->push.default:matching' rebase.stat:'show a diffstat of what changed upstream since last rebase::->bool:false' rebase.autosquash:'autosquash by default::->bool:false' receive.autogc:'run git gc --auto after receiving data::->bool:true' @@ -1989,6 +2047,7 @@ _git-config () { sendemail.bcc:'value of Bcc\: header::_email_addresses' sendemail.cc:'value of Cc\: header::_email_addresses' sendemail.cccmd:'command to generate Cc\: header with:Cc\: command:_path_commands' + sendemail.toccmd:'command to generate To\: header with:To\: command:_path_commands' sendemail.chainreplyto:'send each email as a reply to the previous one::->bool:false' sendemail.confirm:'type of confirmation required before sending::->sendemail.confirm:auto' sendemail.envelopesender:'envelope sender to send emails as::_email_addresses' @@ -2010,6 +2069,7 @@ _git-config () { 'sendemail.*.bcc:value of Bcc\: header::_email_addresses' 'sendemail.*.cc:value of Cc\: header::_email_addresses' 'sendemail.*.cccmd:command to generate Cc\: header with:Cc\: command:_path_commands' + 'sendemail.*.tocmd:command to generate To\: header with:To\: command:_path_commands' 'sendemail.*.chainreplyto:send each email as a reply to the previous one::->bool:false' 'sendemail.*.confirm:type of confirmation required before sending::->sendemail.confirm:auto' 'sendemail.*.envelopesender:envelope sender to send emails as::_email_addresses' @@ -2365,6 +2425,13 @@ _git-config () { always:"always $parts[2]" \ {auto,true,yes,on}:$parts[2] && ret=0 ;; + (commit.cleanup) + __git_config_values -- "$current" "$parts[5]" \ + strip:'remove both whitespace and commentary lines' \ + whitespace:'remove leading and trailing whitespace lines' \ + verbatim:'no not change the commit message at all' \ + default:'act as '\''strip'\'' if the message is to be edited and as '\''whitespace'\'' otherwise' && ret=0 + ;; (compression) __git_compression_levels && ret=0 ;; @@ -2413,10 +2480,23 @@ _git-config () { __git_guard_number 'number of days' fi ;; + (diff.algorithm) + __git_config_values -- "$current" "$parts[5]" \ + default:'basic greedy diff algorithm' \ + myers:'basic greedy diff algorithm' \ + minimal:'spend extra time to make sure the smallest possible diff is produced' \ + patience:'generate diffs with patience algorithm' \ + histogram:'generate diffs with histogram algorithm' && ret=0 + ;; (diff.renames) __git_config_booleans "$current" "$parts[5]" "$parts[2]" \ {copies,copy}:'try to detect both renames and copies' && ret=0 ;; + (diff.submodule) + __git_config_values -- "$current" "$parts[5]" \ + short:'show pairs of commit name' \ + log:'list commits like git submodule does' && ret=0 + ;; (encoding) __git_encodings && ret=0 ;; @@ -2446,12 +2526,25 @@ _git-config () { SQLite:'use the SQLite database driver' \ Pg:'use the Pg database driver' && ret=0 ;; + (grep.patternType) + __git_config_values -- "$current" "$parts[5]" \ + basic:'use --basic-regexp' \ + default:'use default' \ + extended:'use --extended-regexp' \ + fixed:'use --fixed-strings' \ + perl:'use --perl-regexp' && ret=0 + ;; (help.format) __git_config_values -- "$current" "$parts[5]" \ man:'use man' \ info:'use info' \ {web,html}:'use HTML' && ret=0 ;; + (help.htmlpath) + _alternative \ + 'path::_files -/' \ + 'url::_urls' && ret=0 + ;; (imap.authMethod) __git_config_values -- "$current" "$parts[5]" \ CRAM-MD5:'use CRAM-MD5' && ret=0 @@ -2472,9 +2565,9 @@ _git-config () { ;; (merge.verbosity) __git_config_values -t verbosity-levels -l 'verbosity level' -- "$current" "$parts[5]" \ - 0:'only final error message if conflicts were detected' - 1:'conflicts' - 2:'conflicts and file changes' + 0:'only final error message if conflicts were detected' \ + 1:'conflicts' \ + 2:'conflicts and file changes' \ 5:'debugging information' && ret=0 ;; (notes.rewriteMode) @@ -2490,7 +2583,8 @@ _git-config () { __git_config_values -- "$current" "$parts[5]" \ nothing:'do not push anything' \ matching:'push all matching branches' \ - tracking:'push current branch to its upstream branch' \ + upstream:'push current branch to its upstream branch' \ + simple:'like upstream, but only if local and remote names are the same' \ current:'push current branch to branch of same name' && ret=0 ;; (receive.denyCurrentBranch) @@ -2893,11 +2987,13 @@ _git-blame () { '-S[use revs from revs-file]:revs-file:_files' \ '--reverse[walk histor forward instead of backward]' \ '(-p --porcelain)'{-p,--porcelain}'[show results designed for machine processing]' \ + '--line-porcelain[show results designed for machine processing but show commit information for every line]' \ '--incremental[show results incrementally for machine processing]' \ '--contents[annotate against the given file if no rev is specified]: :_files' \ '(-h --help)'{-h,--help}'[show help message]' \ '-c[use same output format as git annotate]' \ '--score-debug[output debugging information relating to -C and -M line movement]' \ + '(-e --show-email)'{-e,--show-email}'[show the author email instead of the author name]' \ '(-f --show-name)'{-f,--show-name}'[show the filename of the original commit]' \ '(-n --show-number)'{-n,--show-number}'[show the line number in the original commit]' \ '-s[suppress author name and timestamp]' \ @@ -2945,6 +3041,7 @@ _git-count-objects () { _git-difftool () { # TODO: Is this fine, or do we need to modify the context or similar? _git-diff \ + '--dir-diff[diff a whole tree by prepare a temporary copy]' \ '(-y --no-prompt --prompt)'{-y,--no-prompt}'[do not prompt before invocation of diff tool]' \ '(-y --no-prompt)--prompt[prompt before invocation of diff tool]' \ '(-t --tool -x --extcmd)'{-t,--tool=-}'[merge resolution program to use]: :__git_difftools' \ @@ -2957,6 +3054,8 @@ _git-fsck () { # TODO: -v is undocumented. _arguments -w -S -s \ '--unreachable[show objects that are unreferenced in the object database]' \ + '(--dangling --no-dangling)--dangling[print dangling objects (default)]' \ + '(--dangling --no-dangling)--no-dangling[do not print dangling objects]' \ '--root[show root nodes]' \ '--tags[show tags]' \ '--cache[consider objects recorded in the index as head nodes for reachability traces]' \ @@ -3040,7 +3139,8 @@ _git-rerere () { 'clear[reset metadata used by rerere]' \ 'forget[resets metadata used by rerere for specific conflict]: :__git_cached_files' \ 'diff[output diffs for the current state of the resolution]' \ - 'status[like diff, but only output filesames]' \ + 'status[print paths with conflicts whose merge resolution rerere will record]' \ + 'remaining[print paths with conflicts that have not been autoresolved by rerere]' \ 'gc[prune old records of conflicted merges]' && ret=0 ;; esac @@ -3300,6 +3400,7 @@ _git-send-email () { '--smtp-server-port=[specify port to connect to SMTP server on]:smtp port:_ports' \ '--smtp-user=[specify user to use for SMTP-AUTH]:smtp user:_users' \ '--cc-cmd=[specify command to generate Cc\: header with]:Cc\: command:_path_commands' \ + '--to-cmd=[specify command to generate To\: header with]:To\: command:_path_commands' \ '( --no-chain-reply-to)--chain-reply-to[send each email as a reply to previous one]' \ '(--chain-reply-to )--no-chain-reply-to[send all emails after first as replies to first one]' \ '--identity=[specify configuration identity]: :__git_sendemail_identities' \ @@ -3593,8 +3694,6 @@ _git-apply () { '--unidiff-zero[disable unified-diff-context check]' \ '--apply[apply patches that would otherwise not be applied]' \ '--no-add[ignore additions made by the patch]' \ - '*--exclude=[skip files matching specified pattern]:pattern' \ - '*--include=[include files matching specified pattern]:pattern' \ '--inaccurate-eof[work around missing-new-line-at-EOF bugs]' \ '(-v --verbose)'{-v,--verbose}'[display progress on stderr]' \ '--recount[do not trust line counts in hunk headers]' \ @@ -3784,9 +3883,10 @@ _git-prune-packed () { (( $+functions[_git-read-tree] )) || _git-read-tree () { - local trivial_opt= aggressive_opt= + local trivial_opt= aggressive_opt= dryrun_opt= if (( words[(I)-m] )); then + dryrun_opt='--dry-run[report if a merge would fail without touching the index or the working tree]' trivial_opt='--trivial[restrict three-way merge to only happen if no file-level merging is required]' aggressive_opt='--aggressive[try harder to resolve merge conflicts]' fi @@ -3810,6 +3910,7 @@ _git-read-tree () { '(-m --prefix)--reset[perform a merge, not just a read, ignoring unmerged entries]' \ '(-m --reset 2 3)--prefix=-[read the contents of specified tree-ish under specified directory]:prefix:_directories -r ""' \ $ui_opts \ + $dryrun_opt \ '-v[display progress on standard error]' \ $trivial_opt \ $aggressive_opt \ @@ -3824,7 +3925,9 @@ _git-read-tree () { (( $+functions[_git-symbolic-ref] )) || _git-symbolic-ref () { _arguments -w -S -s \ + '(-d --delete)'{-d,--delete}'[delete symbolic ref]' \ '(-q --quiet)'{-q,--quiet}'[do not issue error if specified name is not a symbolic ref]' \ + '--short[shorten the ref name (eg. refs/heads/master -> master)]' \ '-m[update reflog for specified name with specied reason]:reason for update' \ ':symbolic reference:__git_heads' \ ':: :__git_references' @@ -4050,6 +4153,8 @@ _git-ls-remote () { '(-h --heads)'{-h,--heads}'[show only refs under refs/heads]' \ '(-t --tags)'{-t,--tags}'[show only refs under refs/tags]' \ '(-u --upload-pack)'{-u,--upload-pack=-}'[specify path to git-upload-pack on remote side]:remote path' \ + '--exit-code[exit with status 2 when no matching refs are found in the remote repository]' \ + '--get-url[expand the URL of the given repository taking into account any "url..insteadOf" config setting]' \ ': :__git_any_repositories' \ '*: :__git_references' } @@ -4086,6 +4191,7 @@ _git-merge-base () { _arguments -w -S -s \ '(-a --all)'{-a,--all}'[display all common ancestors]' \ '--octopus[compute best common ancestors of all supplied commits]' \ + '--is-ancestor[tell if A is ancestor of B (by exit status)]' \ '(-)--independent[display minimal subset of supplied commits with same ancestors]' \ ': :__git_commits' \ '*: :__git_commits' @@ -4202,6 +4308,7 @@ _git-daemon () { # TODO: --interpolated-path should complete %H, %CH, %IP, %P, and %D. _arguments -S \ '--strict-paths[match paths exactly]' \ + '--access-hook=-[allow an external tool to accept or decline service]:path:_directories' \ '--base-path=-[remap all the path requests as relative to the given path]:path:_directories' \ '--base-path-relaxed[allow lookup of base path witout prefix]' \ '--interpolated-path=-[dynamically construct alternate paths]:path:_directories' \ @@ -4390,7 +4497,9 @@ _git-check-attr () { fi _arguments -C \ + {-a,--all}'[list all attributes that are associated with the specified paths]' \ '--stdin[read file names from stdin instead of from command line]' \ + '--cached[consider .gitattributes in the index only, ignoring the working tree.]' \ $z_opt \ '(-)--[interpret preceding arguments as attributes and following arguments as path names]' \ '*:: :->attribute-or-file' && ret=0 @@ -5308,15 +5417,6 @@ __git_remote_references () { __git_references } -(( $+functions[__git_note_references] )) || -__git_local_references () { - local references expl - - references=(${${(M)${${(f)"$(_call_program references git ls-remote ./. 2>/dev/null)"}#*$'\t'}:#refs/notes/*}#refs/notes/}) - __git_command_successful $pipestatus || return 1 - - _wanted references expl reference compadd - $references -} (( $+functions[__git_notes_refs] )) || __git_notes_refs () { local expl @@ -5600,6 +5700,8 @@ __git_setup_log_options () { '(- *)-h[display help]' '( --no-decorate)--decorate=-[print out ref names of any commits that are shown]: :__git_log_decorate_formats' '(--decorate )--no-decorate[do not print out ref names of any commits that are shown]' + '( --no-follow)--follow[follow renames]' + '(--follow )--no-follow[do not follow renames]' '--source[show which ref each commit is reached from]') } @@ -5612,7 +5714,14 @@ __git_setup_diff_options () { $diff_types{-U,--unified=}'[generate diff with given lines of context]: :__git_guard_number lines' $diff_types'--raw[generate default raw diff output]' $diff_types'--patch-with-raw[generate patch but also keep the default raw diff output]' - '--patience[generate diffs with patience algorithm]' + '(--minimal --patience --histogram --diff-algorithm)--minimal[spend extra time to make sure the smallest possible diff is producedm]' + '(--minimal --patience --histogram --diff-algorithm)--patience[generate diffs with patience algorithm]' + '(--minimal --patience --histogram --diff-algorithm)--histogram[generate diffs with histogram algorithm]' + '(--minimal --patience --histogram --diff-algorithm)--diff-algorithm=[choose a diff algorithm]:diff algorithm:((default\:"basic greedy diff algorithm" + myers\:"basic greedy diff algorithm" + minimal\:"spend extra time to make sure the smallest possible diff is produced" + patience\:"generate diffs with patience algorithm" + histogram\:"generate diffs with histogram algorithm"))' $diff_types'--stat=-[generate diffstat instead of patch]:: :__git_guard_diff-stat-width' $diff_types'--numstat[generate more machine-friendly diffstat]' $diff_types'--shortstat[generate summary diffstat]' @@ -5624,7 +5733,7 @@ __git_setup_diff_options () { $diff_types'--name-only[show only names of changed files]' $diff_types'--name-status[show only names and status of changed files]' '--submodule=-[select output format for submodule differences]::format:((short\:"show pairs of commit names" - log\:"list commits like git submodule does (default)"))' + log\:"list commits like git submodule does"))' '( --no-color --color-words)--color=-[show colored diff]:: :__git_color_whens' '(--color --color-words)--no-color[turn off colored diff]' '--word-diff=-[show word diff]::mode:((color\:"highlight changed words using color" @@ -5676,8 +5785,6 @@ __git_setup_diff_options () { # TODO: --cumulative is undocumented. '--cumulative[undocumented]' - # TODO: --follow is undocumented. - '--follow[undocumented]' # TODO: --textconv is undocumented. '--textconv[undocumented]' # TODO: --no-textconv is undocumented. @@ -5708,10 +5815,9 @@ __git_setup_revision_options () { '--abbrev-commit[show only partial prefixes of commit object names]' '--oneline[shorthand for --pretty=oneline --abbrev-commit]' '--encoding=-[output log messages in given encoding]:: :__git_encodings' - '(--no-notes --show-notes --standard-notes --no-standard-notes)--no-notes[do not show notes that annotate commit]' - '(--no-notes --show-notes --standard-notes --no-standard-notes)--show-notes[do not show notes that annotate commit]:: :__git_note_references' - '(--no-notes --show-notes --standard-notes --no-standard-notes)--no-standard-notes[enable populating notes ref list from core.notesRef and notes.displayRef]' - '(--no-notes --show-notes --standard-notes --no-standard-notes)--no-standard-notes[disable populating notes ref list from core.notesRef and notes.displayRef]' + '(--no-notes --notes)--no-notes[do not show notes that annotate commit]' + '(--no-notes )*--notes=[show notes that annotate commit, with optional ref argument show this notes ref instead of the default notes ref(s)]:: :__git_notes_refs' + '--show-signature[validate GPG signature of commit]' '( --date)--relative-date[show dates relative to current time]' '(--relative-date )--date=-[format of date output]: :__git_date_formats' '--parents[display parents of commit]' @@ -5743,8 +5849,8 @@ __git_setup_revision_options () { '--remotes=[-show all commits from refs/remotes]::pattern' '--glob=[show all commits from refs matching glob]:pattern' '--stdin[read commit objects from standard input]' - '--cherry-pick[omit any same-change commits]' '(-g --walk-reflogs --reverse)'{-g,--walk-reflogs}'[walk reflog entries from most recent to oldest]' + '--grep-reflog=[limit commits to ones whose reflog message matches the given pattern (with -g, --walk-reflogs)]:pattern' '--merge[after a failed merge, show refs that touch files having a conflict]' '--boundary[output uninteresting commits at boundary]' '--simplify-by-decoration[show only commits that are referenced by a ref]' @@ -5760,21 +5866,26 @@ __git_setup_revision_options () { '(--objects )--objects-edge[display object ids of objects referenced by listed and excluded commits]' '( --do-walk)--no-walk[only display given revs, do not traverse their ancestors]' '(--no-walk )--do-walk[only display given revs, traversing their ancestors]' + '( --cherry-pick)--cherry-mark[like --cherry-pick but mark equivalent commits instead of omitting them]' + '(--cherry-pick )--cherry-pick[omit any commit that introduces the same change as another commit on "the other side" of a symmetric range]' + '( --right-only)--left-only[list only commits on the left side of a symmetric range]' + '(--left-only )--right-only[list only commits on the right side of a symmetric range]' + '(--left-only --right-only --cherry-pick --cherry-mark)--cherry[synonym for --right-only --cherry-mark --no-merges]' + '(-c --cc )--full-diff[show full commit diffs when using log -p, not only those affecting the given path]' + '--log-size[print log message size in bytes before the message]' + '--use-mailmap[use mailmap file to map author and committer names and email]' # TODO: --reflog is undocumented. '--reflog[show all commits from reflogs]' # TODO: --default is undocumented. '--default[use argument as default revision]:default revision:__git_revisions' - # TODO: --full-diff is undocumented. - '(-c --cc )--full-diff[undocumented]' # TODO: --abrev is undocumented. '--abbrev=[set minimum SHA1 display-length]: :__git_guard_number length' # TODO: --no-abbrev is undocumented. '--no-abbrev[undocumented]' # TODO: --early-output is undocumented. '--early-output=-[undocumented]::undocumented' - # TODO: --log-size is undocumented. - '--log-size[undocumented]') + ) if (( words[(I)--objects(|-edge)] )); then revision_options+=('--unpacked[print object IDs not in packs]') @@ -5786,6 +5897,8 @@ __git_setup_merge_options () { merge_options=( '( --no-commit)--commit[perform the merge and commit the result]' '(--commit )--no-commit[perform the merge but do not commit the result]' + '( --no-edit)--edit[open an editor to change the commit message]' + '(--edit )--no-edit[do not open an editor to change the commit message]' '( --no-ff)--ff[do not generate a merge commit if the merge resolved as a fast-forward]' '(--ff )--no-ff[generate a merge commit even if the merge resolved as a fast-forward]' '( --no-log)--log[fill in one-line descriptions of the commits being merged in the log message]' @@ -5807,6 +5920,7 @@ __git_setup_fetch_options () { '(: *)--all[fetch all remotes]' '(-a --append)'{-a,--append}'[append ref names and object names of fetched refs to "$GIT_DIR/FETCH_HEAD"]' '--depth=[deepen the history of a shallow repository by the given number of commits]: :__git_guard_number depth' + '--unshallow[convert a shallow clone to a complete one]' '--dry-run[show what would be done, without making any changes]' '(-f --force)'{-f,--force}'[allow refs that are not ancestors to be updated]' '(-k --keep)'{-k,--keep}'[keep downloaded pack]' @@ -5815,6 +5929,10 @@ __git_setup_fetch_options () { '(--no-tags -t --tags)'{-t,--tags}'[fetch remote tags]' '(-u --update-head-ok)'{-u,--update-head-ok}'[allow updates of current branch head]' '--upload-pack=[specify path to git-upload-pack on remote side]:remote path' + '(--no-recurse-submodules --recurse-submodules)--recurse-submodules=[specify when to fetch commits of submodules]:recursive fetching mode:((no\:"disable recursion" + yes\:"always recurse" + on-demand\:"only when submodule reference in superproject is updated"))' + '(--no-recurse-submodules --recurse-submodules)--no-recurse-submodules[disable recursive fetching of submodules]' '(-q --quiet -v --verbose --progress)'{-q,--quiet}'[suppress all output]' '(-q --quiet -v --verbose)'{-v,--verbose}'[output additional information]' '(-q --quiet)--progress[output progress information]') @@ -5828,7 +5946,10 @@ __git_setup_apply_options () { '-C-[ensure at least N lines of context match before and after each change]: :_guard "[[\:digit\:]]#" "number of lines of context"' '--reject[apply hunks that apply and leave rejected hunks in .rej files]' '(--ignore-space-change --ignore-whitespace)'{--ignore-space-change,--ignore-whitespace}'[ignore changes in whitespace in context lines]' - '--directory=[root to prepend to all filenames]:root:_directories') + '--directory=[root to prepend to all filenames]:root:_directories' + '*--exclude=[skip files matching specified pattern]:pattern' + '*--include=[include files matching specified pattern]:pattern' + ) } # Git Config Helpers @@ -6085,6 +6206,7 @@ __git_sendemail_suppresscc_values () { bodycc:'avoid including anyone mentiond in Cc lines in patch body except for self' \ sob:'avoid including anyone mentiond in Signed-off-by lines except for self' \ cccmd:'avoid running --cc-cmd' \ + tocmd:'avoid running --to-cmd' \ body:'equivalent to sob + bodycc' \ all:'avoid all auto Cc values' } -- cgit v1.2.3 From 6c4c11929ce3b4022c6b1f46df274a999c71e0e2 Mon Sep 17 00:00:00 2001 From: Øystein Walle Date: Sun, 22 Sep 2013 12:48:20 +0200 Subject: 31747: _git: completion updates to match latest git v1.8.3 part 2 --- ChangeLog | 5 ++ Completion/Unix/Command/_git | 118 +++++++++++++++++++++++++++++++++---------- 2 files changed, 96 insertions(+), 27 deletions(-) (limited to 'Completion/Unix/Command/_git') diff --git a/ChangeLog b/ChangeLog index c16198ffe..6e3b3ae41 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2013-09-22 Øystein Walle + + * 31747: Completion/Unix/Command/_git: _git: completion updates to + match latest git v1.8.3 part 2 + 2013-09-22 m0viefreak * 31741: Completion/Unix/Command/_git: _git: fix a wrong variable diff --git a/Completion/Unix/Command/_git b/Completion/Unix/Command/_git index 867bd67d4..205ae67f8 100644 --- a/Completion/Unix/Command/_git +++ b/Completion/Unix/Command/_git @@ -64,8 +64,9 @@ _git-add () { '(-i --interactive : -)'{-i,--interactive}'[add contents interactively to index]' \ '(-p --patch)'{-p,--patch}'[like -i but go directly into patch mode for specified files]' \ '(-e --edit)'{-e,--edit}'[open diff against index in editor]' \ - '(-u --update -A --all)'{-u,--update}'[update only files git already knows about]' \ - '(-A --all -u --update)'{-A,--all}'[act as both add . and add -u]' \ + '(-A --all --no-ignore-removal -u --update --no-all --ignore-removal)'{-A,--all,--no-ignore-removal}'[add, modify, and remove index entries to match the working tree]' \ + '(-A --all --no-ignore-removal -u --update --no-all --ignore-removal)'{--no-all,--ignore-removal}'[like "--all" but ignore removals]' \ + '(-A --all --no-ignore-removal -u --update --no-all --ignore-removal)'{-u,--update}'[update the index just where it already has an entry matching ]' \ '(-N --intent-to-add)'{-N,--intent-to-add}'[record only that path will be added later]' \ '--refresh[do not add files, but refresh their stat() info in index]' \ '--ignore-errors[continue adding if an error occurs]' \ @@ -104,6 +105,7 @@ _git-am () { _arguments -S \ '(-s --signoff)'{-s,--signoff}'[add Signed-off-by: line to the commit message]' \ '(-k --keep)'{-k,--keep}'[pass -k to git mailinfo]' \ + '--keep-non-patch[pass -b to git mailinfo]' \ '( --no-keep-cr)--keep-cr[pass --keep-cr to git mailsplit]' \ '(--keep-cr )--no-keep-cr[do not pass --keep-cr to git mailsplit]' \ '(-c --scissors --no-scissors)'{-c,--scissors}'[strip everything before a scissors line]' \ @@ -315,10 +317,12 @@ _git-branch () { _arguments -w -S -s \ "($c $m $d $e --no-color :)--color=-[turn on branch coloring]:: :__git_color_whens" \ "($c $m $d $e : --color)--no-color[turn off branch coloring]" \ + "($c $m $d $e --no-column)"'--column=[display tag listing in columns]:column.branch option:((always\:"always show in columns" never\:"never show in columns" auto\:"show in columns if the output is to the terminal" column\:"fill columns before rows (default)" row\:"fill rows before columns" plain\:"show in one column" dense\:"make unequal size columns to utilize more space" nodense\:"make equal size columns"))' \ + "($c $m $d $e --column)"'--no-column[do not display in columns]' \ "($c $m $d $e )*--list[list only branches matching glob]:pattern" \ "($c $m $e -a)-r[list or delete only remote-tracking branches]" \ "($c $m $d $e: -r)-a[list both remote-tracking branches and local branches]" \ - "($c $m $d $e : -v --verbose)"{-v,--verbose}'[show SHA1 and commit subject line for each head]' \ + "($c $m $d $e : -v -vv --verbose)"{-v,-vv--verbose}'[show SHA1 and commit subject line for each head]' \ "($c $m $d $e :)--abbrev=[set minimum SHA1 display-length]: :__git_guard_number length" \ "($c $m $d $e :)--no-abbrev[do not abbreviate sha1s]" \ "($l $m $d $e)-l[create the branch's reflog]" \ @@ -419,6 +423,7 @@ _git-checkout () { '(--patch)--no-track[override the branch.autosetupmerge configuration variable]' \ $new_branch_reflog_opt \ '(-b -B -t --track --patch)--orphan[create a new orphan branch based at given commit]: :__git_branch_names' \ + '--ignore-skip-worktree-bits[ignores patterns and adds back any files in ]' \ '(-q --quiet -f --force -m --merge --conflict --patch)'{-m,--merge}'[3way merge current branch, working tree and new branch]' \ '(-q --quiet -f --force -m --merge --patch)--conflict[same as --merge, using given merge style]:style:(merge diff3)' \ '(-)'{-p,--patch}'[interactively select hunks in diff between given tree-ish and working tree]' \ @@ -472,6 +477,8 @@ _git-cherry-pick () { '(- :)--quit[end revert or cherry-pick sequence]' \ '(- :)--continue[resume revert or cherry-pick sequence]' \ '(- :)--abort[cancel revert or cherry-pick sequence]' \ + '--allow-empty-message[allow replaying a commit with an empty message]' \ + '--keep-redundant-commits[keep cherry-picked commits that will become empty]' \ '(-e --edit --ff)'{-e,--edit}'[edit commit before committing the revert]' \ '(--ff)-x[append information about what commit was cherry-picked]' \ '(-m --mainline)'{-m,--mainline}'[specify mainline when cherry-picking a merge commit]:parent number' \ @@ -588,6 +595,18 @@ _git-clone () { return ret } +(( $+functions[_git-column] )) || +_git-column () { + _arguments -w -S -s \ + '--command=[look up layout mode using config vars column. and column.ui]' \ + '--mode=[specify layout mode. See configuration variable column.ui for option syntax]' \ + '--raw-mode=[same as --mode but take mode encoded as a number]' \ + '--width=[specify the terminal width]' \ + '--indent=[string to be printed at the beginning of each line]' \ + '--nl[string to be printed at the end of each line, including newline character]' \ + '--padding[the number of spaces between columns. One space by default]' +} + (( $+functions[_git-commit] )) || _git-commit () { local amend_opt='--amend[amend the tip of the current branch]' @@ -623,6 +642,7 @@ _git-commit () { default\:"act as '\''strip'\'' if the message is to be edited and as '\''whitespace'\'' otherwise"))' \ '(-e --edit --no-edit)'{-e,--edit}'[edit the commit message before committing]' \ '(-e --edit --no-edit)--no-edit[do not edit the commit message before committing]' \ + '--no-post-rewrite[bypass the post-rewrite hook]' \ '(-a --all --interactive -o --only -i --include)'{-i,--include}'[update the given files and commit the whole index]' \ '(-a --all --interactive -o --only -i --include)'{-o,--only}'[commit only the given files]' \ '(-u --untracked-files)'{-u-,--untracked-files=}'[show files in untracked directories]::mode:((no\:"show no untracked files" @@ -863,7 +883,8 @@ _git-grep () { _arguments -C -A '-*' \ '(-O --open-files-in-pager --no-index)--cached[search blobs registered in index file instead of working tree]' \ '(--cached)--no-index[search files in current directory, not just treacked files]' \ - '--exclude-standard[exclude files standard ignore mechanisms]' \ + '(--exclude-standard)--no-exclude-standard[also search in ignored files]' \ + '(--no-exclude-standard)--exclude-standard[exclude files standard ignore mechanisms]' \ '--untracked[search in untracked files]' \ '(-a --text)'{-a,--text}'[process binary files as if they were text]' \ '(-i --ignore-case)'{-i,--ignore-case}'[ignore case when matching]' \ @@ -878,7 +899,7 @@ _git-grep () { '(-E --extended-regexp -G --basic-regexp -P --perl-regexp -F --fixed-strings)'{-G,--basic-regexp}'[use POSIX basic regexes]' \ '(-E --extended-regexp -G --basic-regexp -P --perl-regexp -F --fixed-strings)'{-P,--perl-regexp}'[use perl-compatible regexes]' \ '(-E --extended-regexp -G --basic-regexp -P --perl-regexp -F --fixed-strings)'{-F,--fixed-strings}'[do not interpret pattern as a regex]' \ - '-n[prefix the line number to matching lines]' \ + '(-n --line-number)'{-n,--line-number}'[prefix the line number to matching lines]' \ '(-l --files-with-matches -L --files-without-match --name-only)'{-l,--files-with-matches,--name-only}'[show only names of matching files]' \ '(-l --files-with-matches -L --files-without-match)'{-L,--files-without-match}'[show only names of non-matching files]' \ '(--cached -O --open-files-in-pager)'{-O,--open-files-in-pager}'=-[open matching files in pager]::_path_commands' \ @@ -888,9 +909,9 @@ _git-grep () { '(--color )---no-color[do not color matches]' \ '--break[prefix the line number to matching lines]' \ '--heading[show the filename above the matches]' \ - '-A[show trailing context]: :__git_guard_number lines' \ - '-B[show leading context]: :__git_guard_number lines' \ - '-C[show context]: :__git_guard_number lines' \ + '(-A --after-context)'{-A,--after-context=}'[show trailing lines, and separate groups of matches]: :__git_guard_number lines' \ + '(-B --before-context)'{-B,--before-context=}'[show leading lines, and separate groups of matches]: :__git_guard_number lines' \ + '(-A --after-context -B --before-context -C --context)'{-C,--context=}'[show leading and trailing lines, and separate groups of matches]: :__git_guard_number lines' \ '(-p --show-function)'{-p,--show-function}'[show preceding line containing function name of match]' \ '(-W --function-context)'{-W,--function-context}'[show whole function where a match was found]' \ '(1)*-f[read patterns from given file]:pattern file:_files' \ @@ -1205,6 +1226,7 @@ _git-push () { '--porcelain[produce machine-readable output]' \ '--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' \ '(-f --force)'{-f,--force}'[allow refs that are not ancestors to be updated]' \ '(:)--repo=[default repository to use]:repository:__git_any_repositories' \ @@ -1233,6 +1255,7 @@ _git-rebase () { _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]' \ '(-m --merge)'{-m,--merge}'[use merging strategies to rebase]' \ '*'{-s,--strategy=}'[use given merge strategy]:merge strategy:__git_merge_strategies' \ @@ -1521,7 +1544,10 @@ _git-status () { normal\:"show untracked files and directories" \ all\:"also show untracked files in untracked directories (default)"))' \ '--ignore-submodules[ignore changes to submodules]:: :__git_ignore_submodules_whens' \ + '--ignored[show ignored files as well]' \ '(--porcelain)-z[use NUL termination on output]' \ + '(--no-column)--column=-[display in columns]::column.status option:((always\:"always show in columns" never\:"never show in columns" auto\:"show in columns if the output is to the terminal" column\:"fill columns before rows (default)" row\:"fill rows before columns" plain\:"show in one column" dense\:"make unequal size columns to utilize more space" nodense\:"make equal size columns"))' \ + '(--column)--no-column[do not display in columns]' \ '*: :__git_ignore_line_inside_arguments _files' } @@ -1653,9 +1679,9 @@ _git-tag () { _arguments -A '-*' \ - creation \ - '( -s -u)-a[create an unsigned, annotated tag]' \ - '(-a -u)-s[create an signed and annotated tag]' \ - '(-a -s )-u[create a tag, annotated and signed with the given key]: :__git_gpg_secret_keys' \ + '( -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' \ '-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 \ @@ -1667,6 +1693,8 @@ _git-tag () { - listing \ '-n+[limit line output of annotation]: :__git_guard_number "limit"' \ '-l[list tags matching pattern]' \ + '(--no-column)--column=-[display tag listing in columns]::column.tag option:((always\:"always show in columns" never\:"never show in columns" auto\:"show in columns if the output is to the terminal" column\:"fill columns before rows (default)" row\:"fill rows before columns" plain\:"show in one column" dense\:"make unequal size columns to utilize more space" nodense\:"make equal size columns"))' \ + '(--column)--no-column[do not display in columns]' \ '--contains=[only list tags which contain the specified commit]: :__git_commits' \ '--points-at=[only list tags of the given object]: :__git_commits' \ '::pattern' \ @@ -1740,7 +1768,9 @@ _git-config () { '(2)--get-regexp[like "--get-all", but interpret "name" as a regular expression]' \ '(2 3 --bool --int --bool-or-int --path -z --null)--get-colorbool[check if color should be used]: :->gettable-colorbool-option' \ '(2 3 --bool --int --bool-or-int --path -z --null)--get-color[find color setting]: :->gettable-color-option' \ - '(-e --edit --bool --int --bool-or-int --path -z --null)'{-e,--edit}'[open config file for editing]' && ret=0 + '(-e --edit --bool --int --bool-or-int --path -z --null)'{-e,--edit}'[open config file for editing]' \ + '(--no-includes)'--includes'[respect "include.*" directives in config files when looking up values]' \ + '(--includes)'--no-includes'[do not respect "include.*" directives]' && ret=0 # TODO: Most all _path_commands should be able to take arguments and so on. # How do we deal with that and how do we quote the whole argument to git @@ -2677,7 +2707,9 @@ _git-fast-export () { '-C-[detect copies as well as renames with given scope]: :__git_guard_number size' \ '--export-marks=[dump internal marks table when complete]: :_files' \ '--import-marks=[load marks before processing input]: :_files' \ + '--import-marks-if-exists=[silently skip if files does not exist]: :_files' \ '--fake-missing-tagger=[fake a tagger when tags lack them]' \ + '--use-done-feature[start with a "feature done" stanza, and terminate with a "done" command]' \ '--no-data[do not output blocb objects, instead referring to them via their SHA-1 hash]' \ '--full-tree[output full tree for each commit]' \ '*: :__git_commit_ranges' @@ -2686,9 +2718,11 @@ _git-fast-export () { (( $+functions[_git-fast-import] )) || _git-fast-import () { _arguments -S -A '-*' \ + '--cat-blob-fd=-[write responses to cat-blob and ls queries to instead of stdout]:file descriptor' \ '--date-format=-[type of dates used in input]:format:((raw\:"native Git format" rfc2822\:"standard email format from RFC 2822" now\:"use current time and timezone"' \ + '--done[terminate with error if there is no "done" command at the end of the stream]' \ '--force[force updating modified existing branches]' \ '--max-pack-size=-[maximum size of each packfile]: :__git_guard_bytes' \ '--big-file-threshold=-[maximum size of blob to create deltas for]: :__git_guard_bytes' \ @@ -2730,6 +2764,7 @@ _git-mergetool () { # TODO: Only complete files with merge conflicts. _arguments -S -A '-*' \ '(-t --tool)'{-t,--tool=}'[merge resolution program to use]: :__git_mergetools' \ + '--tool-help[print a list of merge tools that may be used with "--tool"]' \ '(-y --no-prompt --prompt)'{-y,--no-prompt}'[do not prompt before invocation of merge resolution program]' \ '(-y --no-prompt)--prompt[prompt before invocation of merge resolution program]' \ '*:conflicted file:_files' @@ -3034,7 +3069,8 @@ _git-cherry () { (( $+functions[_git-count-objects] )) || _git-count-objects () { _arguments \ - '(-v --verbose)'{-v,--verbose}'[also report number of in-pack objects and objects that can be removed]' + '(-v --verbose)'{-v,--verbose}'[also report number of in-pack objects and objects that can be removed]' \ + {-H,--human-readable}'[Print sizes in human readable format]' } (( $+functions[_git-difftool] )) || @@ -3046,6 +3082,9 @@ _git-difftool () { '(-y --no-prompt)--prompt[prompt before invocation of diff tool]' \ '(-t --tool -x --extcmd)'{-t,--tool=-}'[merge resolution program to use]: :__git_difftools' \ '(-t --tool -x --extcmd)'{-x,--extcmd=-}'[custom diff command to use]: :_path_commands' \ + '--tool-help[print a list of diff tools that may be used with --tool]' \ + '(--symlinks)--no-symlinks[make copies of instead of symlinks to the working tree]' \ + '(---no-symlinks)--symlinks[make symlinks to instead of copies of the working tree]' \ '(-g --gui)'{-g,--gui}'[use diff.guitool instead of diff.tool]' } @@ -3075,10 +3114,11 @@ _git-get-tar-commit-id () { (( $+functions[_git-help] )) || _git-help () { _arguments -w -S -s \ - '( -i --info -m --man -w --web)'{-a,--all}'[show all available commands]' \ - '(-a --all -m --man -w --web)'{-i,--info}'[show all available commands]' \ - '(-a --all -i --info -w --web)'{-m,--man}'[show all available commands]' \ - '(-a --all -i --info -m --man )'{-w,--web}'[show all available commands]' \ + '( -g --guides -i --info -m --man -w --web)'{-a,--all}'[show all available commands]' \ + '(-a --all -g --guides -m --man -w --web)'{-i,--info}'[show all available commands]' \ + '(-a --all -g --guides -i --info -w --web)'{-m,--man}'[show all available commands]' \ + '(-a --all -g --guides -i --info -m --man )'{-w,--web}'[show all available commands]' \ + '(-g --guides)'{-g,--guides}'[prints a list of useful guides on the standard output]' \ ': :_git_commands' } @@ -3198,6 +3238,7 @@ _git-rev-parse () { '( --symbolic-full-name)--symbolic[output in a format as true to input as possible]' \ '(--symbolic )--symbolic-full-name[same as --symbolic, but omit non-ref inputs]' \ '--abbrev-ref=-[a non-ambiguous short name of object]::mode:(strict loose)' \ + '--disambiguate=-[show every object whose name begins with the given prefix]:prefix' \ '--all[show all refs found in refs/]' \ '--branches=-[show branch refs found in refs/heads/]::shell glob pattern' \ '--tags=-[show tag refs found in refs/tags/]::shell glob pattern' \ @@ -3213,6 +3254,7 @@ _git-rev-parse () { '(--revs-only --no-revs --flags --no-flags --verify)--short=-[show only shorter unique name]:: :__git_guard_number length' \ '(--since --after)'{--since=-,--after=-}'[show --max-age= parameter corresponding given date string]:datestring' \ '(--until --before)'{--until=-,--before=-}'[show --min-age= parameter corresponding given date string]:datestring' \ + '--resolve-git-dir[check if is a valid repository or gitfile and print location]:git dir:_files -/' \ '*: :__git_objects' && ret=0 fi @@ -3392,13 +3434,16 @@ _git-send-email () { '--subject=[specify the initial subject of the email thread]:subject' \ '--to=[specify the primary recipient of the emails]: :_email_addresses' \ '--8bit-encoding=[encoding to use for non-ASCII messages]: :__git_encodings' \ + '--compose-encoding=[encoding to use for compose messages]: :__git_encodings' \ '--envelope-sender[specify the envelope sender used to send the emails]: :_email_addresses' \ '--smtp-encryption=[specify encryption method to use]: :__git_sendemail_smtpencryption_values' \ '--smtp-domain=[specify FQDN used in HELO/EHLO]: :_domains' \ '--smtp-pass=[specify password to use for SMTP-AUTH]::password' \ '--smtp-server=[specify SMTP server to connect to]:smtp server:_hosts' \ '--smtp-server-port=[specify port to connect to SMTP server on]:smtp port:_ports' \ + '--smtp-server-option=[specify the outgoing SMTP server option to use]:SMPT server option' \ '--smtp-user=[specify user to use for SMTP-AUTH]:smtp user:_users' \ + '--smtp-debug=[enable or disable debug output]:smtp debug:((0\:"disable" 1\:"enable"))' \ '--cc-cmd=[specify command to generate Cc\: header with]:Cc\: command:_path_commands' \ '--to-cmd=[specify command to generate To\: header with]:To\: command:_path_commands' \ '( --no-chain-reply-to)--chain-reply-to[send each email as a reply to previous one]' \ @@ -3917,6 +3962,7 @@ _git-read-tree () { $exclude_per_directory_opt \ '--index-output=[write index in the named file instead of $GIT_INDEX_FILE]: :_files' \ '--no-sparse-checkout[display sparse checkout support]' \ + '--empty[instead of reading tree object(s) into the index, just empty it]' \ '1:first tree-ish to be read/merged:__git_tree_ishs' \ '2::second tree-ish to be read/merged:__git_tree_ishs' \ '3::third tree-ish to be read/merged:__git_tree_ishs' @@ -4331,6 +4377,8 @@ _git-daemon () { '--disable=-[disable site-wide service]: :__git_daemon_service' \ '--allow-override[allow overriding site-wide service]: :__git_daemon_service' \ '--forbid-override[forbid overriding site-wide service]: :__git_daemon_service' \ + '(--no-informative-errors)--informative-errors[report more verbose errors to the client]' \ + '(--informative-errors)--no-informative-errors[report all errors as "access denied" to the client]' \ '*:repository:_directories' } @@ -4535,7 +4583,10 @@ _git-check-attr () { _git-check-ref-format () { _arguments \ '-h[display usage information]' \ - '--print[display canonicalized name of hypothetical reference of given name]' \ + '(--no-allow-onelevel)--allow-onelevel[accept one-level refnames]' \ + '(--allow-onelevel)--no-allow-onelevel[do not accept one-level refnames]' \ + '--refspec-pattern[interpret as a reference name pattern for a refspec]' \ + '--normalize[Normalize refname by removing leading slashes]' \ '--branch[expand previous branch syntax]' \ ': :__git_references' } @@ -4590,7 +4641,8 @@ _git-patch-id () { (( $+functions[_git-stripspace] )) || _git-stripspace () { _arguments \ - '(-s --strip-comments)'{-s,--strip-comments}'[also strip lines starting with #]' + '(-s --strip-comments)'{-s,--strip-comments}'[also strip lines starting with #]' \ + '(-c --comment-lines)'{-c,--comment-lines}'[prepend comment character and blank to each line]' } # INTERNAL GIT COMPLETION FUNCTIONS @@ -5747,13 +5799,11 @@ __git_setup_diff_options () { '--full-index[show full object name of pre- and post-image blob]' '(--full-index)--binary[in addition to --full-index, output binary diffs for git-apply]' '--abbrev=[set minimum SHA1 display-length]: :__git_guard_number length' - # TODO: --break-rewrites is undocumented. '(-B --break-rewrites)'{-B-,--break-rewrites=-}'[break complete rewrite changes into pairs of given size]:: :__git_guard_number size' - # TODO: --detect-renames is undocumented. - '(-M --detect-renames)'{-M-,--detect-renames=-}'[detect renames with given scope]:: :__git_guard_number size' - # TODO: --detect-copies is undocumented. - '(-C --detect-copies)'{-C-,--detect-copies=-}'[detect copies as well as renames with given scope]:: :__git_guard_number size' + '(-M --find-renames)'{-M-,--find-renames=-}'[Detect renames with given scope]:: :__git_guard_number size' + '(-C --find-copies)'{-C-,--find-copies=-}'[detect copies as well as renames with given scope]:: :__git_guard_number size' '--find-copies-harder[try harder to find copies]' + '(-D --irreversible-delete)'{-D,--irreversible-delete}'[omit the preimage for deletes]' '-l-[limit number of rename/copy targets to run]: :__git_guard_number' '--diff-filter=-[select certain kinds of files for diff]: :_guard "[ACDMRTUXB*]#" kinds' '-S-[look for differences that contain the given string]:string' @@ -5812,7 +5862,8 @@ __git_setup_revision_options () { email\:"use email headers like From and Subject" raw\:"the raw commits" format\:"specify own format"))' - '--abbrev-commit[show only partial prefixes of commit object names]' + '(--abbrev-commit --no-abbrev-commit)--abbrev-commit[show only partial prefixes of commit object names]' + '(--abbrev-commit --no-abbrev-commit)--no-abbrev-commit[show the full 40-byte hexadecimal commit object name]' '--oneline[shorthand for --pretty=oneline --abbrev-commit]' '--encoding=-[output log messages in given encoding]:: :__git_encodings' '(--no-notes --notes)--no-notes[do not show notes that annotate commit]' @@ -5841,6 +5892,10 @@ __git_setup_revision_options () { '--remove-empty[stop when given path disappears from tree]' '--merges[display only merge commits]' '--no-merges[do not display commits with more than one parent]' + '(--min-parents --no-min-parents)--min-parents=-[show only commits having at least commits]: :__git_guard_number "minimum number of parents"' + '(--min-parents --no-min-parents)--no-min-parents[reset limit]' + '(--max-parents --no-max-parents)--max-parents=-[show only commits having at most commits]: :__git_guard_number "maximum number of parents"' + '(--max-parents --no-max-parents)--no-max-parents[reset limit]' '--first-parent[follow only first parent from merge commits]' '*--not[reverses meaning of ^ prefix for revisions that follow]' '--all[show all commits from refs]' @@ -5910,6 +5965,8 @@ __git_setup_merge_options () { '--ff-only[refuse to merge unless HEAD is up to date or merge can be resolved as a fast-forward]' '*'{-s,--strategy=}'[use given merge strategy]:merge strategy:__git_merge_strategies' '*'{-X,--strategy-option=}'[pass merge-strategy-specific option to merge strategy]' + '(--verify-signatures)--no-verify-signatures[verify the commits being merged or abort]' + '(--no-verify-signatures)--verify-signatures[do not verify the commits being merged]' '(-q --quiet -v --verbose)'{-q,--quiet}'[suppress all output]' '(-q --quiet -v --verbose)'{-v,--verbose}'[output additional information]') } @@ -5929,10 +5986,13 @@ __git_setup_fetch_options () { '(--no-tags -t --tags)'{-t,--tags}'[fetch remote tags]' '(-u --update-head-ok)'{-u,--update-head-ok}'[allow updates of current branch head]' '--upload-pack=[specify path to git-upload-pack on remote side]:remote path' - '(--no-recurse-submodules --recurse-submodules)--recurse-submodules=[specify when to fetch commits of submodules]:recursive fetching mode:((no\:"disable recursion" + '(--no-recurse-submodules --recurse-submodules)--recurse-submodules=-[specify when to fetch commits of submodules]::recursive fetching mode:((no\:"disable recursion" yes\:"always recurse" on-demand\:"only when submodule reference in superproject is updated"))' '(--no-recurse-submodules --recurse-submodules)--no-recurse-submodules[disable recursive fetching of submodules]' + '(--no-recurse-submodules)--recurse-submodules-default=-[provide internal temporary non-negative value for "--recurse-submodules"]::recursive fetching mode:((yes\:"always recurse" + on-demand\:"only when submodule reference in superproject is updated"))' + '--submodule-prefix=-[prepend to paths printed in informative messages]:submodule prefix path:_files -/' '(-q --quiet -v --verbose --progress)'{-q,--quiet}'[suppress all output]' '(-q --quiet -v --verbose)'{-v,--verbose}'[output additional information]' '(-q --quiet)--progress[output progress information]') @@ -6267,13 +6327,17 @@ _git() { '(- :)--help[display help message]' \ '-c[pass configuration parameter to command]:parameter' \ '--exec-path=-[path containing core git-programs]:: :_directories' \ - '--html-path[display path to HTML documentation and exit]' \ + '(: -)--man-path[print the manpath for the man pages for this version of Git and exit]' \ + '(: -)--info-path[print the path where the info files are installed and exit]' \ + '(: -)--html-path[display path to HTML documentation and exit]' \ '(-p --paginate)'{-p,--paginate}'[pipe output into $PAGER]' \ '--no-pager[do not pipe git output into a pager]' \ '--git-dir=-[path to repository]: :_directories' \ '--work-tree=-[path to working tree]: :_directories' \ + '--namespace=-[set the Git namespace]: :_directories' \ '--bare[use $PWD as repository]' \ '--no-replace-objects[do not use replacement refs to replace git objects]' \ + '--literal-pathspecs[treat pathspecs literally, rather than as glob patterns]' \ '(-): :->command' \ '(-)*:: :->option-or-argument' && return -- cgit v1.2.3 From 5ec6a1510a71ccd7b8be41b841f593c1ecbcba3b Mon Sep 17 00:00:00 2001 From: Øystein Walle Date: Sun, 22 Sep 2013 12:48:21 +0200 Subject: 31750: _git: add new configuration options to match latest git v1.8.3 --- ChangeLog | 3 ++ Completion/Unix/Command/_git | 101 ++++++++++++++++++++++++++++++++++++++++++- 2 files changed, 103 insertions(+), 1 deletion(-) (limited to 'Completion/Unix/Command/_git') diff --git a/ChangeLog b/ChangeLog index 6e3b3ae41..a574f8677 100644 --- a/ChangeLog +++ b/ChangeLog @@ -3,6 +3,9 @@ * 31747: Completion/Unix/Command/_git: _git: completion updates to match latest git v1.8.3 part 2 + * 31750: Completion/Unix/Command/_git: _git: add new configuration + options to match latest git v1.8.3 + 2013-09-22 m0viefreak * 31741: Completion/Unix/Command/_git: _git: fix a wrong variable diff --git a/Completion/Unix/Command/_git b/Completion/Unix/Command/_git index 205ae67f8..294620be5 100644 --- a/Completion/Unix/Command/_git +++ b/Completion/Unix/Command/_git @@ -1781,15 +1781,29 @@ _git-config () { declare -a git_options_static git_options_static=( advice.pushNonFastForward:'show advice when git push refuses non-fast-forward refs::->bool:true' + advice.pushUpdateRejected:'combined setting for advice.push*::->bool:true' + advice.pushNonFFCurrent:'show advice when git push fails due to a non-fast-forward update to the current branch::->bool:true' + advice.pushNonFFDefault:'show advice to set push.default to "upstream" or "current" after running git-push::->bool:true' + advice.pushNonFFMatching:'show advice when running git-push and pushed matching refs explicitly::->bool:true' + advice.pushAlreadyExists:'show advice when git-push rejects an update that does not qualify for fast-forwarding::->bool:true' + advice.pushFetchFirst:'show advice when git-push rejects an update that tries to overwrite a remote ref that points at unknown object::->bool:true' + advice.pushNeedsForce:'show advice when git-push rejects an update that tries to overwrite a remote ref that points a non-commitish::->bool:true' advice.statusHints:'show advice in output of git status::->bool:true' + advice.statusUoption:'show advice to consider using the "-u" option to git-status when it takes more than 2 seconds::->bool:true' advice.commitBeforeMerge:'show advice when git merge refuses to merge::->bool:true' advice.resolveConflict:'show advice when conflict prevents operation from being performed::->bool:true' advice.implicitIdentity:'show advice when identity is guessed from system settings::->bool:true' advice.detachedHead:'show advice when entering detached-HEAD state::->bool:true' + advice.amWorkDir:'show the location of the patch file when git-am fails to apply it::->bool:true' blame.blankboundary:'show blank SHA-1 for boundary commits::->bool:false' blame.showroot:'show root commits as normal commits::->bool:false' blame.date:'date format to use in output::__git_date_formats:iso' + 'branch.*.description:branch description:branch description:->string' + cvsexportcommit.cvsdir:'the default location of the CVS checkout to use for the export:cvs export dir:_directories' core.fileMode:'track changes to the executable bit of files::->bool:true' + core.attributesfile:'look into this file for attributes in addition to .gitattributes:additional attributes file:_files' + core.abbrev:'set the length object names are abbreviated to:length:->int:7' + core.commentchar:'comment character when using an editor::->string' core.ignoreCygwinFSTricks:'use Cygwin stat()/lstat()::->bool:true' core.ignorecase:'use workarounds for non-case-sensitive filesystems::->bool:false' core.trustctime:'trust inode change time::->bool:true' @@ -1811,6 +1825,7 @@ _git-config () { core.loosecompression:'level of compression to apply to non-pack files::->compression:1' core.packedGitWindowSize:'size of mappings of pack files:pack window size:->bytes' core.packedGitLimit:'maximum number of bytes to map from pack files:maximum pack file map size:->bytes' + core.precomposeunicode:'revert the unicode decomposition of filenames done by Mac OS::->bool:false' core.deltaBaseCacheLimit:'maximum size of cache for base objects:maximum base objects cache size:->bytes:16m' core.bigFileThreshold:'maximum size of files to compress:maximum compress size:->bytes:512m' core.excludesfile:'additional file to use for exclusion:excludes file:_files' @@ -1821,9 +1836,17 @@ _git-config () { core.fsyncobjectfiles:'fsync() when writing object files::->bool:false' core.preloadindex:'use parallel index preload for operations like git diff::->bool:false' core.createObject:'take steps to prevent overwriting existing objects::->core.createObject:link' + core.checkstat:'determine which stat fields to match between the index and work tree::->core.checkstat:default' core.notesRef:'show notes in given refs:refs:->string:refs/notes/commits' core.sparseCheckout:'use sparse checkout::->bool:false' + credential.helper:'external helper to be called when a username or password credential is needed::_path_commands' + credential.useHttpPath:'consider the "path" component of an http or https URL to be important::->bool:false' + credential.username:'If no username is set use this username by default:default username:->string' + 'credential.*.helper:external helper to be called when a username or password credential is needed::_path_commands' + 'credential.*.useHttpPath:consider the "path" component of an http or https URL to be important::->bool:false' + 'credential.*.username:if no username is set use this username by default:default username:->string' add.ignore-errors:'ignore indexing errors when adding files::->bool:false' + add.ignoreErrors:'ignore indexing errors when adding files::->bool:false' am.keepcr:'keep CR characters when splitting mails::->bool:false' apply.ignorewhitespace:'ignore whitespace changes::->apply.ignorewhitespace:no' apply.whitespace:'default value for the --whitespace option::->apply.whitespace:error' @@ -1841,6 +1864,7 @@ _git-config () { color.branch.current:'color of the current branch::->color' color.branch.local:'color of a local branch::->color' color.branch.remote:'color of a remote branch::->color' + color.branch.upstream:'color of upstream branches::->color' color.branch.plain:'color of other branches::->color' color.diff:'color output of git diff::->color-bool' color.diff.plain:'color of context text::->color' @@ -1872,6 +1896,7 @@ _git-config () { color.pager:'feed colored output to pager::->bool:true' color.showbranch:'color output of git show-branch::->color-bool' color.status:'color output of git status::->color-bool' + color.status.branch:'color of the current branch::->color' color.status.header:'color of header text::->color' color.status.added:'color of added, but not yet committed, files::->color' color.status.updated:'color of updated, but not yet committed, files::->color' @@ -1882,15 +1907,23 @@ _git-config () { commit.cleanup:'default --cleanup option::->commit.cleanup:default' commit.status:'include status information in commit message template::->bool:true' commit.template:'template file for commit messages:template:_files' + 'diff.*.binary:make the diff driver treat files as binary::->bool:false' + 'diff.*.cachetextconv:make the diff driver cache the text conversion outputs::->bool:false' + 'diff.*.command:custom diff driver command::_path_commands' + 'diff.*.textconv:command to generate the text-converted version of a file::_path_commands' + 'diff.*.wordregex:regular expression that the diff driver should use to split words in a line:regular expression:->string' + 'diff.*.xfuncname:regular expression that the diff driver should use to recognize the hunk header:regular expression:->string' diff.algorithm:'default diff algorithm::->diff.algorithm:default' diff.autorefreshindex:'run git update-index --refresh before git diff::->bool:true' diff.context:'default number of context lines::->int:3' + diff.dirstat:'comma separated list of --dirstat parameters specifying default behaviour:comma-separated list:->string:changes,noncumulative,3' diff.external:'command to generate diff with:diff command:_path_commands' diff.mnemonicprefix:'use mnemonic source and destination prefixes::->bool:false' diff.noprefix:'strip source and destination prefixes::->bool:false' diff.renameLimit:'number of files to consider when detecting copy/renames:rename limit:->int' diff.renames:'try to detect renames::->diff.renames:true' diff.ignoreSubmodules:'ignore submodules::->bool:false' + diff.statGraphWidth:'width of the graph part in --stat output:width:->int' diff.submodule:'output format for submodule differences::->diff.submodule:short' diff.suppressBlankEmpty:'inbihit printing space before empty output lines::->bool:false' diff.tool:'diff tool to use::__git_difftools' @@ -1900,7 +1933,12 @@ _git-config () { diff.wordRegex:'regex used to determine what a word is when performing word-by-word diff:regex:->string' diff.guitool:'diff tool with gui to use::__git_difftools' fetch.unpackLimit:'maximum number of objects to unpack when fetching:unpack limit:->int' + fetch.recurseSubmodules:'recurse into submodules (as needed) when fetching::->fetch.recurseSubmodules:on-demand' + fetch.fsckObjects:'check all fetched objects::->bool:false' + 'filter.*.clean:command which is used to convert the content of a worktree file to a blob upon checkin::_path_commands' + 'filter.*.smudge:command which is used to convert the content of a blob object to a worktree file upon checkout::_path_commands' format.attach:'use multipart/mixed attachments::->bool:false' + format.coverLetter:'control whether to generate a cover-letter when format-patch is invoked::->bool:false' format.numbered:'use sequence numbers in patch subjects::->format.numbered:auto' format.headers:'additional email headers to include in email patches:headers:->string' format.to:'additional email recipients of patches::->string' @@ -1940,6 +1978,7 @@ _git-config () { 'gitcvs.*.dbTableNamePrefix:database table name prefix:prefix:->string' gitcvs.usecrlfattr:'use end-of-line conversion attributes::->bool:false' gitcvs.allbinary:'treat all files from CVS as binary::->bool:false' + gpg.program:'use program instead of "gpg" found on $PATH when making or verifying a PGP signature::_path_commands' gui.commitmsgwidth:'width of commit message window:width::->int:75' gui.diffcontext:'number of context lines used in diff window:context::->int:5' gui.encoding:'encoding to use for displaying file contents::->encoding' @@ -1951,6 +1990,16 @@ _git-config () { gui.fastcopyblame:'try harder during blame detection::->bool:false' gui.copyblamethreshold:'threshold to use in blame location detection:threshold:->string' gui.blamehistoryctx:'specify radius of history context in days for selected commit::->days' + 'guitool.*.argprompt:prompt for arguments:argument prompt:->string' + 'guitool.*.cmd:shell command line to execute::_path_commands' + 'guitool.*.confirm:show a confirmation dialog::->bool:false' + 'guitool.*.needsfile:require that a diff is selected for command to be available::->bool:false' + 'guitool.*.noconsole:suppress command output::->bool:false' + 'guitool.*.norescan:skip rescanning for changes to the working directory::->bool:false' + 'guitool.*.revprompt:request a single valid revision from the user, and set the "REVISION" environment variable::->string' + 'guitool.*.prompt:prompt to display:prompt:->string' + 'guitool.*.revunmerged:show only unmerged branches in revprompt::->bool:false' + 'guitool.*.title:title of prompt dialog:prompt title:->string' guitool.cmd:'shell command line to execute::_path_commands' guitool.needsfile:'require that a diff is selected for command to be available::->bool:false' guitool.noconsole:'suppress command output::->bool:false' @@ -1961,10 +2010,14 @@ _git-config () { guitool.revunmerged:'show only unmerged branches in revprompt::->bool:false' guitool.title:'title of prompt dialog:prompt title:->string' guitool.prompt:'prompt to display:prompt:->string' + grep.extendedRegexp:'enable --extended-regexp option by default (ignored when grep.patternType is set)::->bool:false' grep.lineNumber:'enable -n option by default::->bool:false' grep.patternType:'default matching pattern type::->grep.patternType:default' help.browser:'browser used to display help in web format::__git_browsers' + http.cookiefile:'file containing cookie lines which should be used in the Git http session::_files' help.htmlpath:'location of HTML help::->help.htmlpath' + http.lowSpeedLimit:'limit controlling when to abort an HTTP transfer:speed limit:->int' + http.lowSpeedTime:'limit controlling when to abort an HTTP transfer:time limit (seconds):->int' help.format:'default help format used by git help::->help.format' help.autocorrect:'execute corrected mistyped commands::->bool:false' http.proxy:'HTTP proxy to use:proxy:_urls' @@ -1974,6 +2027,7 @@ _git-config () { http.sslCertPasswordProtected:'prompt for a password for the SSL certificate::->bool:false' http.sslCAInfo:'file containing CA certificates to verify against for HTTPS:CA certificates file:_files' http.sslCAPath:'directory containing files with CA certificates to verify against for HTTPS:CA certificates directory:_directories' + http.sslTry:'attempt to use AUTH SSL/TLS and encrypted data transfers when connecting via regular FTP protocol::->bool:false' http.maxRequests:'how many HTTP requests to launch in parallel:maximum number of requests::->int:5' http.minSessions:'number of curl sessions to keep across requests:mininmum number of sessions::->int:1' http.postBuffer:'maximum size of buffer used by smart HTTP transport when POSTing:maximum POST buffer size:->bytes:1m' @@ -2003,15 +2057,21 @@ _git-config () { instaweb.modulepath:'module path for the Apache HTTP-daemon for instaweb:module directory:_directories' instaweb.port:'port to bind HTTP daemon to for instaweb::_ports' interactive.singlekey:'accept one-letter input without Enter::->bool:false' + log.abbrevCommit:'make git-log, git-show, and git-whatchanged assume --abbrev-commit::->bool:false' log.date:'default date-time mode::__git_date_formats' log.decorate:'type of ref names to show::__git_log_decorate_formats' + log.mailmap:'make git-log, git-show, and git-whatchanged assume --use-mailmap:->bool:false' log.showroot:'show initial commit as a diff against an empty tree::->bool:true' mailinfo.scissors:'remove everything in body before a scissors line::->bool:false' + mailmap.blob:'like mailmap.file, but consider the value as a reference to a blob in the repository:blob reference:->string' mailmap.file:'augmenting mailmap file:mailmap file:_files' man.viewer:'man viewer to use for help in man format::__git_man_viewers' 'man.*.cmd:the command to invoke the specified man viewer:man command:_path_commands' 'man.*.path:path to use for the man viewer:absolute man tool path:_files -g "*(*)"' + merge.branchdesc:'populate the log message with the branch description text as well::->bool:false' merge.conflictstyle:'style used for conflicted hunks::->merge.conflictstyle:merge' + merge.defaultToUpstream:'merge the upstream branches configured for the current branch by default::->bool:false' + merge.ff:'allow fast-forward merges::->merge.ff:true' merge.log:'include summaries of merged commits in new merge commit messsages::->bool:false' merge.renameLimit:'number of files to consider when detecting copy/renames during merge:limit:->int' merge.renormalize:'use canonical representation of files during merge::->bool:false' @@ -2049,6 +2109,7 @@ _git-config () { rebase.autosquash:'autosquash by default::->bool:false' receive.autogc:'run git gc --auto after receiving data::->bool:true' receive.fsckObjects:'check all received objects::->bool:true' + receive.hiderefs:'string(s) receive-pack uses to decide which refs to omit from its initial advertisement:hidden refs:->string' receive.unpackLimit:'maximum number of objects received for unpacking into loose objects:unpack limit:->int' receive.denyDeletes:'deny a ref update that deletes a ref::->bool:false' receive.denyDeleteCurrent:'deny a ref update that deletes currently checked out branch::->bool:false' @@ -2071,9 +2132,11 @@ _git-config () { repack.usedeltabaseoffset:'use delta-base offsets::->bool:true' rerere.autoupdate:'update index after resolution::->bool:false' rerere.enabled:'record resolved conflicts::->bool' + sendemail.identity:'default identity::__git_sendemail_identities' sendemail.smtpencryption:'encryption method to use::->sendemail.smtpencryption' sendemail.aliasesfile:'file containing email aliases:email aliases file:_files' sendemail.aliasfiletype:'format of aliasesfile::->sendemail.aliasfiletype' + sendemail.annotate:'review and edit each patch you are about to send::->bool:false' sendemail.bcc:'value of Bcc\: header::_email_addresses' sendemail.cc:'value of Cc\: header::_email_addresses' sendemail.cccmd:'command to generate Cc\: header with:Cc\: command:_path_commands' @@ -2090,12 +2153,14 @@ _git-config () { sendemail.to:'value of To\: header::_email_addresses' sendemail.smtpdomain:'FQDN to use for HELO/EHLO commands to SMTP server:smtp domain:_domains' sendemail.smtpserver:'SMTP server to connect to:smtp host:_hosts' + sendemail.smtpserveroption:'specifies the outgoing SMTP server option to use:SMTP server option:->string' sendemail.smtpserverport:'port to connect to SMTP server on:smtp port:_ports' sendemail.smtpuser:'user to use for SMTP-AUTH:smtp user:_users' sendemail.thread:'set In-Reply-To\: and References\: headers::->bool:true' sendemail.validate:'perform sanity checks on patches::->bool:true' 'sendemail.*.aliasesfile:file containing email aliases::_files' 'sendemail.*.aliasfiletype:format of aliasesfile::->sendemail.aliasfiletype' + 'sendemail.*.annotate:review and edit each patch you are about to send::bool->false' 'sendemail.*.bcc:value of Bcc\: header::_email_addresses' 'sendemail.*.cc:value of Cc\: header::_email_addresses' 'sendemail.*.cccmd:command to generate Cc\: header with:Cc\: command:_path_commands' @@ -2112,15 +2177,19 @@ _git-config () { 'sendemail.*.to:value of To\: header::_email_addresses' 'sendemail.*.smtpdomain:FQDN to use for HELO/EHLO commands to SMTP server:smtp domain:_domains' 'sendemail.*.smtpserver:SMTP server to connect to:smtp host:_hosts' + 'sendemail.*.smtpserveroption:specifies the outgoing SMTP server option to use:SMTP server option:->string' 'sendemail.*.smtpserverport:port to connect to SMTP server on:smtp port:_ports' 'sendemail.*.smtpuser:user to use for SMTP-AUTH:smtp user:_users' 'sendemail.*.thread:set In-Reply-To\: and References\: headers::->bool:true' 'sendemail.*.validate:perform sanity checks on patches::->bool:true' sendemail.assume8bitEncoding:'encoding to use for non-ASCII messages::__git_encodings' + sequence.editor:'text editor used by git rebase -i::_path_commands' showbranch.default:'default set of branches for git show-branch::->branch' status.relativePaths:'show paths relative to current directory::->bool:false' status.showUntrackedFiles:'show untracked files::->status.showUntrackedFiles:normal' status.submodulesummary:'include submodule summary::->bool:false' + 'submodule.*.branch:remote branch name for a submodule:branch name:->string' + 'submodule.*.fetchRecurseSubmodules:fetch commits of submodules::->bool' 'submodule.*.path:path within project:submodule directory:_directories -qS \:' 'submodule.*.url:URL to update from::__git_any_repositories' 'submodule.*.update:update strategy to use::->submodule.update' @@ -2134,6 +2203,7 @@ _git-config () { svn.followparent:'follow parent commit::->bool:true' svn.authorsFile:'default authors file:authors file:_files' svn.quiet:'produce less output::->bool:false' + 'svn-remote.*.automkdirs:attempt to recreate empty directories that are in the Subversion repository::->bool:true' 'svn-remote.*.noMetadata:disable git-svn-id: lines at end of commits::->bool:false' 'svn-remote.*.useSvmProps:use remappings of URLs and UUIDs from mirrors::->bool:false' 'svn-remote.*.useSvnsyncProps:use remappings of URLs and UUIDs for the svnsync command::->bool:false' @@ -2142,10 +2212,17 @@ _git-config () { 'svn-remote.*.ignore-paths:regular expression of paths to not check out:regular expression:->string' 'svn-remote.*.url:URL to connect to::_urls' 'svn-remote.*.fetch:fetch specification::__git_ref_specs' + 'svn-remote.*.pushurl:URL to push to::_urls' 'svn-remote.*.branches:branch mappings:branch mapping:->string' 'svn-remote.*.tags:tag mappings:tag mapping:->string' + 'tar.*.command:specify a shell command through which the tar output generated by git archive should be piped::_path_commands' + 'tar.*.remote:enable for use by remote clients via git-upload-archive::->bool' tar.umask:'umask to apply::->umask' transfer.unpackLimit:'default value for fetch.unpackLimit and receive.unpackLimit:unpack limit::->int:100' + transfer.fsckObjects:'check all objects::->bool:false' + transfer.hiderefs:'string(s) to decide which refs to omit from initial advertisements:hidden refs:->string' + uploadpack.hiderefs:'string(s) upload-pack uses to decide which refs to omit from its initial advertisement:hidden refs:->string' + uploadpack.allowtipsha1inwant:'allow upload-pack to accept a fetch request that asks for an object at the tip of a hidden ref::->bool:false' 'url.*.insteadOf:string to start URLs with:prefix:->string' 'url.*.pushInsteadOf:string to start URLs to push to with:prefix:->string' user.email:'email address used for commits::_email_addresses' @@ -2186,10 +2263,13 @@ _git-config () { 'color.grep.:git-grep-specific color option' 'color.interactive.:interaction-specific color option' 'color.status.:git-status-specific color option' + 'credential.*.:${${line[1]#credential.}%.*}-specific option' + 'filter.*.:${${line[1]#filter.}%.*} driver option' + 'diff.*.:${${line[1]#diff.}%.*} driver option' 'difftool.*.:${${line[1]#difftool.}%.*}-specific option' 'gc.*.:${${line[1]#gc.}%.*}-specific gc option' 'gitcvs.*.:gitcvs ${${line[1]#gitcvs.}%.*}-specific option' - 'guitool.*.:${${line[1]#gc.}%.*}-specific option' + 'guitool.*.:${${line[1]#guitool.}%.*}-specific option' 'man.*.:${${line[1]#man.}%.*}-specific man option' 'merge.*.:${${line[1]#merge.}%.*}-specific merge option' 'mergetool.*.:${${line[1]#mergetool.}%.*}-specific option' @@ -2235,6 +2315,9 @@ _git-config () { (browser.) __git_browsers -S . && ret=0 ;; + (credential.) + _urls && ret=0 + ;; (difftool.) __git_difftools -S . && ret=0 ;; @@ -2282,6 +2365,7 @@ _git-config () { sections=( advice:'options controlling advice' core:'options controlling git core' + credential:'credential options' add:'git add options' alias:'command aliases' am:'git am options' @@ -2296,6 +2380,7 @@ _git-config () { fetch:'git fetch options' format:'format options' gc:'git gc options' + gpg:'gpg options' gitcvs:'git-cvs options' gui:'git gui options' guitool:'git gui tool options' @@ -2329,6 +2414,7 @@ _git-config () { submodule:'git submodule options' tar:'git tar-tree options' transfer:'options controlling transfers' + uploadpack:'git upload-pack options' url:'URL prefixes' user:'options controlling user identity' web:'web options' @@ -2469,6 +2555,11 @@ _git-config () { __git_config_booleans "$current" "$parts[5]" "$parts[2]" \ input:'convert CRLFs on input only' && ret=0 ;; + (core.checkstat) + __git_config_values -- "$current" "$parts[5]" \ + default:'check all fields' \ + minimal:'check fewer fields' && ret=0 + ;; (core.createObject) __git_config_values -- "$current" "$parts[5]" \ rename:'rename source objects' \ @@ -2536,6 +2627,10 @@ _git-config () { crlf:'use CR+LF' \ native:'use line ending of platform' && ret=0 ;; + (fetch.recurseSubmodules) + __git_config_booleans "$current" "$parts[5]" "$parts[2]" \ + on-demand:'only when submodule reference in superproject is updated' && ret=0 + ;; (format.numbered) __git_config_booleans "$current" "$parts[5]" "$parts[2]" \ auto:'use sequence numbers if more than one patch' && ret=0 @@ -2593,6 +2688,10 @@ _git-config () { merge:'use standard merge style' \ diff3:'use diff3 style' && ret=0 ;; + (merge.ff) + __git_config_booleans "$current" "$parts[5]" "$parts[2]" \ + only:'only allow fast-forward merges (equivalent to --ff-only)' && ret=0 + ;; (merge.verbosity) __git_config_values -t verbosity-levels -l 'verbosity level' -- "$current" "$parts[5]" \ 0:'only final error message if conflicts were detected' \ -- cgit v1.2.3 From e45f685d4addb4d1ae13ed8353e5ff95b7010d3a Mon Sep 17 00:00:00 2001 From: m0viefreak Date: Sun, 22 Sep 2013 12:48:22 +0200 Subject: 31746: _git: reword _git-config TODO Support for merge drivers, filter drivers, and diff drivers is missing. --- ChangeLog | 5 +++++ Completion/Unix/Command/_git | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) (limited to 'Completion/Unix/Command/_git') diff --git a/ChangeLog b/ChangeLog index a574f8677..c4fbc1df4 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2013-09-22 m0viefreak + + * 31746: Completion/Unix/Command/_git: _git: reword _git-config + TODO + 2013-09-22 Øystein Walle * 31747: Completion/Unix/Command/_git: _git: completion updates to diff --git a/Completion/Unix/Command/_git b/Completion/Unix/Command/_git index 294620be5..0d0cb02c0 100644 --- a/Completion/Unix/Command/_git +++ b/Completion/Unix/Command/_git @@ -1775,7 +1775,7 @@ _git-config () { # TODO: Most all _path_commands should be able to take arguments and so on. # How do we deal with that and how do we quote the whole argument to git # config? - # TODO: Add merge.*.(name|driver|recursive) and diff.*.(command|funcname) + # TODO: Add support for merge.*. (merge driver), diff.*. (diff driver), and filter.*. (filter driver) options # (see gitattributes(5)). # TODO: .path options should take absolute paths. declare -a git_options_static -- cgit v1.2.3 From 735e7becb9291b4feb0a55e903edf2f0e66fec37 Mon Sep 17 00:00:00 2001 From: m0viefreak Date: Sun, 22 Sep 2013 12:48:23 +0200 Subject: 31748: _git: support completing remote branches without / prefix this is used in git 1.8's git checkout as a shorthand for git checkout -b --track / in case exists on exactly one remote and is not a local branch --- ChangeLog | 3 +++ Completion/Unix/Command/_git | 16 ++++++++++++++++ 2 files changed, 19 insertions(+) (limited to 'Completion/Unix/Command/_git') diff --git a/ChangeLog b/ChangeLog index c4fbc1df4..232b9d604 100644 --- a/ChangeLog +++ b/ChangeLog @@ -3,6 +3,9 @@ * 31746: Completion/Unix/Command/_git: _git: reword _git-config TODO + * 31748: Completion/Unix/Command/_git: _git: support completing + remote branches without / prefix + 2013-09-22 Øystein Walle * 31747: Completion/Unix/Command/_git: _git: completion updates to diff --git a/Completion/Unix/Command/_git b/Completion/Unix/Command/_git index 0d0cb02c0..9d074536a 100644 --- a/Completion/Unix/Command/_git +++ b/Completion/Unix/Command/_git @@ -440,22 +440,27 @@ _git-checkout () { if (( CURRENT == 1 )) && [[ -z $opt_args[(I)--] ]]; then # TODO: Allow A...B local branch_arg='branches::__git_revisions' \ + remote_branch_noprefix_arg='remote branches::__git_remote_branch_names_noprefix' \ tree_ish_arg='tree-ishs::__git_tree_ishs' \ file_arg='modified-files::__git_modified_files' if [[ -n ${opt_args[(I)-b|-B|--orphan]} ]]; then + remote_branch_noprefix_arg= tree_ish_arg= file_arg= elif [[ -n $opt_args[(I)--track] ]]; then branch_arg='remote-branches::__git_remote_branch_names' + remote_branch_noprefix_arg= tree_ish_arg= file_arg= elif [[ -n ${opt_args[(I)--ours|--theirs|-m|--conflict|--patch]} ]]; then branch_arg= + remote_branch_noprefix_arg= fi _alternative \ $branch_arg \ + $remote_branch_noprefix_arg \ $tree_ish_arg \ $file_arg && ret=0 elif [[ -n ${opt_args[(I)-b|-B|-t|--track|--orphan]} ]]; then @@ -5371,6 +5376,17 @@ __git_remote_branch_names () { _wanted remote-branch-names expl 'remote branch name' compadd $* - $branch_names } +(( $+functions[__git_remote_branch_names_noprefix] )) || +__git_remote_branch_names_noprefix () { + local expl + declare -a heads + + branch_names=(${${${(f)"$(_call_program remote-branch-refs-noprefix git for-each-ref --format='"%(refname)"' refs/remotes 2>/dev/null)"}##*/}:#HEAD}) + __git_command_successful $pipestatus || return 1 + + _wanted remote-branch-names-noprefix expl 'remote branch name' compadd $* - $branch_names +} + (( $+functions[__git_commits] )) || __git_commits () { # TODO: deal with things that __git_heads and __git_tags has in common (i.e., -- cgit v1.2.3 From ab05a3d6d48ffaa9bb17621fe5843cd8a446d078 Mon Sep 17 00:00:00 2001 From: Øystein Walle Date: Sun, 22 Sep 2013 12:48:24 +0200 Subject: 31749: _git: fix some typos in description texts --- ChangeLog | 5 +++++ Completion/Unix/Command/_git | 32 ++++++++++++++++---------------- 2 files changed, 21 insertions(+), 16 deletions(-) (limited to 'Completion/Unix/Command/_git') diff --git a/ChangeLog b/ChangeLog index 232b9d604..16f7d1b4f 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2013-09-22 Øystein Walle + + * 31749: Completion/Unix/Command/_git: _git: fix some typos in + description texts + 2013-09-22 m0viefreak * 31746: Completion/Unix/Command/_git: _git: reword _git-config diff --git a/Completion/Unix/Command/_git b/Completion/Unix/Command/_git index 9d074536a..eaff1b30a 100644 --- a/Completion/Unix/Command/_git +++ b/Completion/Unix/Command/_git @@ -1930,7 +1930,7 @@ _git-config () { diff.ignoreSubmodules:'ignore submodules::->bool:false' diff.statGraphWidth:'width of the graph part in --stat output:width:->int' diff.submodule:'output format for submodule differences::->diff.submodule:short' - diff.suppressBlankEmpty:'inbihit printing space before empty output lines::->bool:false' + diff.suppressBlankEmpty:'inhibit printing space before empty output lines::->bool:false' diff.tool:'diff tool to use::__git_difftools' 'difftool.*.cmd:command to invoke for the diff tool::_path_commands' 'difftool.*.path:path to use for the diff tool:absolute diff tool path:_files -g "*(*)"' @@ -2034,7 +2034,7 @@ _git-config () { http.sslCAPath:'directory containing files with CA certificates to verify against for HTTPS:CA certificates directory:_directories' http.sslTry:'attempt to use AUTH SSL/TLS and encrypted data transfers when connecting via regular FTP protocol::->bool:false' http.maxRequests:'how many HTTP requests to launch in parallel:maximum number of requests::->int:5' - http.minSessions:'number of curl sessions to keep across requests:mininmum number of sessions::->int:1' + http.minSessions:'number of curl sessions to keep across requests:minimum number of sessions::->int:1' http.postBuffer:'maximum size of buffer used by smart HTTP transport when POSTing:maximum POST buffer size:->bytes:1m' http.lowSpeedLimit:'lower limit for HTTP transfer-speed:low transfer-speed limit:->int' http.lowSpeedTime:'duration for http.lowSpeedLimit:time:->int' @@ -2077,7 +2077,7 @@ _git-config () { merge.conflictstyle:'style used for conflicted hunks::->merge.conflictstyle:merge' merge.defaultToUpstream:'merge the upstream branches configured for the current branch by default::->bool:false' merge.ff:'allow fast-forward merges::->merge.ff:true' - merge.log:'include summaries of merged commits in new merge commit messsages::->bool:false' + merge.log:'include summaries of merged commits in new merge commit messages::->bool:false' merge.renameLimit:'number of files to consider when detecting copy/renames during merge:limit:->int' merge.renormalize:'use canonical representation of files during merge::->bool:false' merge.stat:'print the diffstat between ORIG_HEAD and merge at end of merge::->bool:true' @@ -2936,7 +2936,7 @@ _git-reflog () { '--expire-unreachable=-[prune entries older than given time and unreachable]: :__git_datetimes' \ '--all[prune all refs]' \ '--updateref[update ref with SHA-1 of top reflog entry after expiring or deleting]' \ - '--rewrite[adjust reflog entries to ensure old SHA-1 points to new SHA-1 of previous entry after expring or deleting]' \ + '--rewrite[adjust reflog entries to ensure old SHA-1 points to new SHA-1 of previous entry after expiring or deleting]' \ '--verbose[output additional information]' && ret=0 ;; (delete) @@ -2944,7 +2944,7 @@ _git-reflog () { _arguments -C -S \ '(-n --dry-run)'{-n,--dry-run}'[undocumented]' \ '--updateref[update ref with SHA-1 of top reflog entry after expiring or deleting]' \ - '--rewrite[adjust reflog entries to ensure old SHA-1 points to new SHA-1 of previous entry after expring or deleting]' \ + '--rewrite[adjust reflog entries to ensure old SHA-1 points to new SHA-1 of previous entry after expiring or deleting]' \ '*:: :->reflog-entry' && ret=0 case $state in @@ -3124,7 +3124,7 @@ _git-blame () { '-l[show long rev]' \ '-t[show raw timestamp]' \ '-S[use revs from revs-file]:revs-file:_files' \ - '--reverse[walk histor forward instead of backward]' \ + '--reverse[walk history forward instead of backward]' \ '(-p --porcelain)'{-p,--porcelain}'[show results designed for machine processing]' \ '--line-porcelain[show results designed for machine processing but show commit information for every line]' \ '--incremental[show results incrementally for machine processing]' \ @@ -3386,7 +3386,7 @@ _git-show-branch () { '(--no-name )--sha1-name[name commits with unique prefix of object names]' \ '--topics[show only commits that are NOT on the first branch given]' \ '( --no-color)--color[color status sign of commits]:: :__git_color_whens' \ - '(--color )--no-color[do not color statis sign of commits]' \ + '(--color )--no-color[do not color status sign of commits]' \ '*: :__git_revisions' \ - reflogs \ '(-g --reflog)'{-g,--reflog=}'[show reflog entries for given ref]:: :->limit-and-base' \ @@ -3567,7 +3567,7 @@ _git-send-email () { '--quiet[be less verbose]' \ '( --no-validate)--validate[perform sanity checks on patches]' \ '(--validate )--validate[do not perform sanity checks on patches]' \ - '--force[send emails even if safetiy checks would prevent it]' \ + '--force[send emails even if safety checks would prevent it]' \ '*: :_files' } @@ -4078,7 +4078,7 @@ _git-symbolic-ref () { '(-d --delete)'{-d,--delete}'[delete symbolic ref]' \ '(-q --quiet)'{-q,--quiet}'[do not issue error if specified name is not a symbolic ref]' \ '--short[shorten the ref name (eg. refs/heads/master -> master)]' \ - '-m[update reflog for specified name with specied reason]:reason for update' \ + '-m[update reflog for specified name with specified reason]:reason for update' \ ':symbolic reference:__git_heads' \ ':: :__git_references' } @@ -4133,7 +4133,7 @@ _git-update-index () { (( $+functions[_git-update-ref] )) || _git-update-ref () { _arguments -w -S -s \ - '-m[update reflog for specified name with specied reason]:reason for update' \ + '-m[update reflog for specified name with specified reason]:reason for update' \ '(:)-d[delete given reference after verifying its value]:symbolic reference:__git_revisions:old reference:__git_revisions' \ '--no-deref[overwrite ref itself, not what it points to]' \ ':symbolic reference:__git_revisions' \ @@ -4383,7 +4383,7 @@ _git-rev-list () { '--timestamp[print raw commit timestamp]' \ '( --bisect-vars --bisect-all)--bisect[show only middlemost commit object]' \ '(--bisect)--bisect-vars[same as --bisect, displaying shell-evalable code]' \ - '(--bisect)--bisect-all[display all commit objects beteen included and excluded commits]' \ + '(--bisect)--bisect-all[display all commit objects between included and excluded commits]' \ '*:: :->commit-or-path' && ret=0 case $state in @@ -4876,7 +4876,7 @@ _git_commands () { notes:'add or inspect object notes' pull:'fetch from and merge with another repository or local branch' push:'update remote refs along with associated objects' - rebase:'fasforward-port local commits to the updated upstream head' + rebase:'forward-port local commits to the updated upstream head' reset:'reset current HEAD to specified state' revert:'revert existing commits' rm:'remove files from the working tree and from the index' @@ -4892,7 +4892,7 @@ _git_commands () { config:'get and set repository or global options' fast-export:'data exporter' fast-import:'import information into git directly' - filter-branch:'rewrite branchers' + filter-branch:'rewrite branches' mergetool:'run merge conflict resolution tools to resolve merge conflicts' pack-refs:'pack heads and tags for efficient repository access' prune:'prune all unreachable objects from the object database' @@ -5169,7 +5169,7 @@ __git_ignore_submodules_whens () { whens=( none:'submodule is dirty when it contains untracked or modified files' - untracked:'submodule is dirty when it contains untracket files' + untracked:'submodule is dirty when it contains untracked files' dirty:'ignore all changes to submodules, showing only changes to commits stored in superproject' all:'ignore all changes to submodules (default)') @@ -6378,8 +6378,8 @@ __git_sendemail_suppresscc_values () { author:'avoid including patch author' \ self:'avoid including sender' \ cc:'avoid including anyone mentioned in Cc lines except for self' \ - bodycc:'avoid including anyone mentiond in Cc lines in patch body except for self' \ - sob:'avoid including anyone mentiond in Signed-off-by lines except for self' \ + bodycc:'avoid including anyone mentioned in Cc lines in patch body except for self' \ + sob:'avoid including anyone mentioned in Signed-off-by lines except for self' \ cccmd:'avoid running --cc-cmd' \ tocmd:'avoid running --to-cmd' \ body:'equivalent to sob + bodycc' \ -- cgit v1.2.3 From cf0eae5d961dae491baea0d2f8810b4293f993f6 Mon Sep 17 00:00:00 2001 From: Øystein Walle Date: Sun, 22 Sep 2013 12:48:25 +0200 Subject: 31751: _git: remove TODOs of actually documented options No functional changes. --- ChangeLog | 3 +++ Completion/Unix/Command/_git | 4 ---- 2 files changed, 3 insertions(+), 4 deletions(-) (limited to 'Completion/Unix/Command/_git') diff --git a/ChangeLog b/ChangeLog index 16f7d1b4f..e36b91d99 100644 --- a/ChangeLog +++ b/ChangeLog @@ -3,6 +3,9 @@ * 31749: Completion/Unix/Command/_git: _git: fix some typos in description texts + * 31751: Completion/Unix/Command/_git: _git: remove TODOs of + actually documented options + 2013-09-22 m0viefreak * 31746: Completion/Unix/Command/_git: _git: reword _git-config diff --git a/Completion/Unix/Command/_git b/Completion/Unix/Command/_git index eaff1b30a..4bb9d2402 100644 --- a/Completion/Unix/Command/_git +++ b/Completion/Unix/Command/_git @@ -1746,7 +1746,6 @@ _git-config () { value_arg=': :->value' fi - # TODO --local is undocumented. _arguments -w -C -S -s \ '( --system --local -f --file)--global[use user-global config file]' \ '(--global --local -f --file)--system[use system-wide config file]' \ @@ -6045,11 +6044,8 @@ __git_setup_revision_options () { '--log-size[print log message size in bytes before the message]' '--use-mailmap[use mailmap file to map author and committer names and email]' - # TODO: --reflog is undocumented. '--reflog[show all commits from reflogs]' - # TODO: --default is undocumented. '--default[use argument as default revision]:default revision:__git_revisions' - # TODO: --abrev is undocumented. '--abbrev=[set minimum SHA1 display-length]: :__git_guard_number length' # TODO: --no-abbrev is undocumented. '--no-abbrev[undocumented]' -- cgit v1.2.3 From 128de883bd54defe29e75632d783b2e655debea9 Mon Sep 17 00:00:00 2001 From: m0viefreak Date: Sun, 22 Sep 2013 12:48:26 +0200 Subject: 31753: _git: correct some "undocumented" options diff options: --cumulative is deprecated --> remove -G / -S: reword -S to emphase the difference to -G revision options: --abbrev: reword, to emphase the --abbrev-commit requirement --- ChangeLog | 5 +++++ Completion/Unix/Command/_git | 16 ++++++---------- 2 files changed, 11 insertions(+), 10 deletions(-) (limited to 'Completion/Unix/Command/_git') diff --git a/ChangeLog b/ChangeLog index e36b91d99..251724ab7 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2013-09-22 m0viefreak + + * 31753: Completion/Unix/Command/_git: _git: correct some + "undocumented" options + 2013-09-22 Øystein Walle * 31749: Completion/Unix/Command/_git: _git: fix some typos in diff --git a/Completion/Unix/Command/_git b/Completion/Unix/Command/_git index 4bb9d2402..d465dfaf8 100644 --- a/Completion/Unix/Command/_git +++ b/Completion/Unix/Command/_git @@ -5920,7 +5920,8 @@ __git_setup_diff_options () { '(-D --irreversible-delete)'{-D,--irreversible-delete}'[omit the preimage for deletes]' '-l-[limit number of rename/copy targets to run]: :__git_guard_number' '--diff-filter=-[select certain kinds of files for diff]: :_guard "[ACDMRTUXB*]#" kinds' - '-S-[look for differences that contain the given string]:string' + '-S-[look for differences that add or remove the given string]:string' + '-G-[look for differences whose added or removed line matches the given regex]:pattern' '--pickaxe-all[when -S finds a change, show all changes in that changeset]' '--pickaxe-regex[treat argument of -S as regular expression]' '-O-[output patch in the order of glob-pattern lines in given file]: :_files' @@ -5935,6 +5936,8 @@ __git_setup_diff_options () { '(--exit-code)--quiet[disable all output]' '( --no-ext-diff)--ext-diff[allow external diff helper to be executed]' '(--ext-diff )--no-ext-diff[disallow external diff helper to be executed]' + '(--textconv --no-textconv)--textconv[allow external text conversion filters to be run when comparing binary files]' + '(--textconv --no-textconv)--no-textconv[do not allow external text conversion filters to be run when comparing binary files]' '--ignore-submodules[ignore changes to submodules]:: :__git_ignore_submodules_whens' '(--no-prefix)--src-prefix=[use given prefix for source]:prefix' '(--no-prefix)--dst-prefix=[use given prefix for destination]:prefix' @@ -5949,12 +5952,6 @@ __git_setup_diff_options () { # TODO: --cumulative is undocumented. '--cumulative[undocumented]' - # TODO: --textconv is undocumented. - '--textconv[undocumented]' - # TODO: --no-textconv is undocumented. - '--no-textconv[undocumented]' - # TODO: -G is undocumented. - '-G[undocumented]' # TODO: --output is undocumented. '--output[undocumented]:undocumented') } @@ -5978,6 +5975,8 @@ __git_setup_revision_options () { format\:"specify own format"))' '(--abbrev-commit --no-abbrev-commit)--abbrev-commit[show only partial prefixes of commit object names]' '(--abbrev-commit --no-abbrev-commit)--no-abbrev-commit[show the full 40-byte hexadecimal commit object name]' + '(--abbrev --no-abbrev)--abbrev=[set minimum SHA1 display-length (for use with --abbrev-commit)]: :__git_guard_number length' + '(--abbrev --no-abbrev)--no-abbrev[show the full 40-byte hexadecimal commit object name]' '--oneline[shorthand for --pretty=oneline --abbrev-commit]' '--encoding=-[output log messages in given encoding]:: :__git_encodings' '(--no-notes --notes)--no-notes[do not show notes that annotate commit]' @@ -6046,9 +6045,6 @@ __git_setup_revision_options () { '--reflog[show all commits from reflogs]' '--default[use argument as default revision]:default revision:__git_revisions' - '--abbrev=[set minimum SHA1 display-length]: :__git_guard_number length' - # TODO: --no-abbrev is undocumented. - '--no-abbrev[undocumented]' # TODO: --early-output is undocumented. '--early-output=-[undocumented]::undocumented' ) -- cgit v1.2.3 From 2025b05bcfc935becf0dea46054b63d191685d3b Mon Sep 17 00:00:00 2001 From: Øystein Walle Date: Sun, 22 Sep 2013 12:48:27 +0200 Subject: 31752: _git: change completion text for consistency --- ChangeLog | 5 +++++ Completion/Unix/Command/_git | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) (limited to 'Completion/Unix/Command/_git') diff --git a/ChangeLog b/ChangeLog index 251724ab7..e71fd3a73 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2013-09-22 Øystein Walle + + * 31752: Completion/Unix/Command/_git: _git: change completion + text for consistency + 2013-09-22 m0viefreak * 31753: Completion/Unix/Command/_git: _git: correct some diff --git a/Completion/Unix/Command/_git b/Completion/Unix/Command/_git index d465dfaf8..2dc9ed2cc 100644 --- a/Completion/Unix/Command/_git +++ b/Completion/Unix/Command/_git @@ -1934,7 +1934,7 @@ _git-config () { 'difftool.*.cmd:command to invoke for the diff tool::_path_commands' 'difftool.*.path:path to use for the diff tool:absolute diff tool path:_files -g "*(*)"' difftool.prompt:'prompt before each invocation of the diff tool::->bool:true' - diff.wordRegex:'regex used to determine what a word is when performing word-by-word diff:regex:->string' + diff.wordRegex:'regex used to determine what a word is when performing word-by-word diff:regular expression:->string' diff.guitool:'diff tool with gui to use::__git_difftools' fetch.unpackLimit:'maximum number of objects to unpack when fetching:unpack limit:->int' fetch.recurseSubmodules:'recurse into submodules (as needed) when fetching::->fetch.recurseSubmodules:on-demand' -- cgit v1.2.3 From 8a70a985777031857eb02366a3115e8f6e1f024f Mon Sep 17 00:00:00 2001 From: m0viefreak Date: Sun, 22 Sep 2013 12:48:28 +0200 Subject: 31754: _git: git rm: make git rm --cached work as intended While limiting the completion to __git_changed-in-index_files makes perfect sense for "git diff", it is wrong to use for "git rm", because it prevents it from completing files present in HEAD. Giving --cached to git rm is supposed to "just remove it from the index, keep the working tree copy" and is in no way related to the file needing to be modified in the index in the first place. --- ChangeLog | 5 +++++ Completion/Unix/Command/_git | 6 +----- 2 files changed, 6 insertions(+), 5 deletions(-) (limited to 'Completion/Unix/Command/_git') diff --git a/ChangeLog b/ChangeLog index e71fd3a73..3220b6291 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2013-09-22 m0viefreak + + * 31754: Completion/Unix/Command/_git: _git: git rm: make git rm + --cached work as intended + 2013-09-22 Øystein Walle * 31752: Completion/Unix/Command/_git: _git: change completion diff --git a/Completion/Unix/Command/_git b/Completion/Unix/Command/_git index 2dc9ed2cc..d6f44e679 100644 --- a/Completion/Unix/Command/_git +++ b/Completion/Unix/Command/_git @@ -1344,11 +1344,7 @@ _git-rm () { case $state in (file) - if [[ -n ${opt_args[(I)--cached]} ]]; then - __git_changed-in-index_files && ret=0 - else - __git_cached_files && ret=0 - fi + __git_cached_files && ret=0 ;; esac -- cgit v1.2.3 From 34ba14e1ec69e3811a72ecc3545e99890bff578a Mon Sep 17 00:00:00 2001 From: Øystein Walle Date: Sun, 20 Oct 2013 19:40:59 +0200 Subject: 31853: _git: Add missing column.* config variables --- ChangeLog | 5 +++++ Completion/Unix/Command/_git | 14 ++++++++++++++ 2 files changed, 19 insertions(+) (limited to 'Completion/Unix/Command/_git') diff --git a/ChangeLog b/ChangeLog index 3064963d5..f424c83c0 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2013-10-21 Øystein Walle + + * 31853: Completion/Unix/Command/_git: _git: Add missing column.* + config variables + 2013-10-19 Peter Stephenson * 31851: Src/exec.c: execstring() should display string to diff --git a/Completion/Unix/Command/_git b/Completion/Unix/Command/_git index d6f44e679..620d2c966 100644 --- a/Completion/Unix/Command/_git +++ b/Completion/Unix/Command/_git @@ -1800,6 +1800,10 @@ _git-config () { blame.date:'date format to use in output::__git_date_formats:iso' 'branch.*.description:branch description:branch description:->string' cvsexportcommit.cvsdir:'the default location of the CVS checkout to use for the export:cvs export dir:_directories' + column.ui:'specify whether supported commands should output in columns.::->column:never' + column.branch:'specify whether to output branch listing in git branch in columns::->column:never' + column.status:'specify whether to output untracked files in git status in columns::->column:never' + column.tag:'specify whether to output tag listing in git tag in columns::->column:never' core.fileMode:'track changes to the executable bit of files::->bool:true' core.attributesfile:'look into this file for attributes in addition to .gitattributes:additional attributes file:_files' core.abbrev:'set the length object names are abbreviated to:length:->int:7' @@ -2374,6 +2378,7 @@ _git-config () { browser:'browser options' clean:'git clean options' color:'color options' + column:'column options' commit:'git commit options' diff:'diff options' difftool:'difftools' @@ -2541,6 +2546,15 @@ _git-config () { always:"always $parts[2]" \ {auto,true,yes,on}:$parts[2] && ret=0 ;; + (column) + __git_config_values -- "$current" "$parts[5]" \ + always:'always show in columns' \ + never:'never show in columns' \ + auto:'show in columns if the output is to the terminal' \ + column:'fill columns before rows (implies "always")' \ + row:'fill rows before columns (implies "akways")' \ + plain:'show in one column (implies "always")' && ret=0 + ;; (commit.cleanup) __git_config_values -- "$current" "$parts[5]" \ strip:'remove both whitespace and commentary lines' \ -- cgit v1.2.3 From 7872a5becdc3ead1d8ea809bfe88b8d9a0b4b599 Mon Sep 17 00:00:00 2001 From: Øystein Walle Date: Sun, 20 Oct 2013 19:41:00 +0200 Subject: 31854: _git: Make git-show accept diff arguments --- ChangeLog | 3 +++ Completion/Unix/Command/_git | 3 ++- 2 files changed, 5 insertions(+), 1 deletion(-) (limited to 'Completion/Unix/Command/_git') diff --git a/ChangeLog b/ChangeLog index f424c83c0..b54a778ff 100644 --- a/ChangeLog +++ b/ChangeLog @@ -3,6 +3,9 @@ * 31853: Completion/Unix/Command/_git: _git: Add missing column.* config variables + * 31854: Completion/Unix/Command/_git: _git: Make git-show accept + diff arguments + 2013-10-19 Peter Stephenson * 31851: Src/exec.c: execstring() should display string to diff --git a/Completion/Unix/Command/_git b/Completion/Unix/Command/_git index 620d2c966..63aa78512 100644 --- a/Completion/Unix/Command/_git +++ b/Completion/Unix/Command/_git @@ -1419,9 +1419,10 @@ _git-show () { local curcontext=$curcontext state line ret=1 typeset -A opt_args - local -a log_options revision_options + local -a log_options revision_options diff_options __git_setup_log_options __git_setup_revision_options + __git_setup_diff_options _arguments -w -C -s \ $log_options \ -- cgit v1.2.3 From 5585b95f3c65d87f698234a781552b006b56e930 Mon Sep 17 00:00:00 2001 From: Øystein Walle Date: Sun, 20 Oct 2013 19:41:01 +0200 Subject: 31859: _git: re-order the last two git-blame arguments The proper syntax is git blame [] where is optional. --- ChangeLog | 3 +++ Completion/Unix/Command/_git | 4 ++-- 2 files changed, 5 insertions(+), 2 deletions(-) (limited to 'Completion/Unix/Command/_git') diff --git a/ChangeLog b/ChangeLog index b54a778ff..5e7370a26 100644 --- a/ChangeLog +++ b/ChangeLog @@ -6,6 +6,9 @@ * 31854: Completion/Unix/Command/_git: _git: Make git-show accept diff arguments + * 31859: Completion/Unix/Command/_git: _git: re-order the last two + git-blame arguments + 2013-10-19 Peter Stephenson * 31851: Src/exec.c: execstring() should display string to diff --git a/Completion/Unix/Command/_git b/Completion/Unix/Command/_git index 63aa78512..2edf116cf 100644 --- a/Completion/Unix/Command/_git +++ b/Completion/Unix/Command/_git @@ -3148,8 +3148,8 @@ _git-blame () { '-s[suppress author name and timestamp]' \ '-w[ignore whitespace when finding lines]' \ $revision_options \ - ': :__git_cached_files' \ - ':: :__git_revisions' && ret=0 + ':: :__git_revisions' \ + ': :__git_cached_files' && ret=0 case $state in (line-range) -- cgit v1.2.3 From 80cb8e947fc2c28e7be4a4e548f0bb34f2a19e9d Mon Sep 17 00:00:00 2001 From: m0viefreak Date: Sun, 20 Oct 2013 19:41:02 +0200 Subject: 31857: _git: Remove unsupported -q option from diff options --- ChangeLog | 5 +++++ Completion/Unix/Command/_git | 1 - 2 files changed, 5 insertions(+), 1 deletion(-) (limited to 'Completion/Unix/Command/_git') diff --git a/ChangeLog b/ChangeLog index 5e7370a26..fd8d54704 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2013-10-21 m0viefreak + + * 31857: Completion/Unix/Command/_git: _git: Remove unsupported -q + option from diff options + 2013-10-21 Øystein Walle * 31853: Completion/Unix/Command/_git: _git: Add missing column.* diff --git a/Completion/Unix/Command/_git b/Completion/Unix/Command/_git index 2edf116cf..75884b717 100644 --- a/Completion/Unix/Command/_git +++ b/Completion/Unix/Command/_git @@ -5959,7 +5959,6 @@ __git_setup_diff_options () { '(-0 -1 -2 -3 --base --ours --theirs -c --cc --no-index)'{-3,--theirs}'[diff against "their branch" version]' '(-0 -1 -2 -3 --base --ours --theirs -c --cc --no-index)-0[omit diff output for unmerged entries]' '(-0 -1 -2 -3 --base --ours --theirs -c --cc --no-index)'{-c,--cc}'[compare "our branch", "their branch" and working tree files]' - '-q[remain silent even on nonexisting files]' # TODO: --cumulative is undocumented. '--cumulative[undocumented]' -- cgit v1.2.3 From 07ca60acf44a4cf1d08eed9279897a8060f862ef Mon Sep 17 00:00:00 2001 From: Øystein Walle Date: Sun, 20 Oct 2013 19:41:03 +0200 Subject: 31858: _git: fix wrong default value --- ChangeLog | 5 +++++ Completion/Unix/Command/_git | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) (limited to 'Completion/Unix/Command/_git') diff --git a/ChangeLog b/ChangeLog index fd8d54704..8753fa1b5 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2013-10-21 Øystein Walle + + * 31858: Completion/Unix/Command/_git: _git: fix wrong default + value + 2013-10-21 m0viefreak * 31857: Completion/Unix/Command/_git: _git: Remove unsupported -q diff --git a/Completion/Unix/Command/_git b/Completion/Unix/Command/_git index 75884b717..a75ce5c76 100644 --- a/Completion/Unix/Command/_git +++ b/Completion/Unix/Command/_git @@ -2150,7 +2150,7 @@ _git-config () { sendemail.confirm:'type of confirmation required before sending::->sendemail.confirm:auto' sendemail.envelopesender:'envelope sender to send emails as::_email_addresses' sendemail.from:'sender email address::_email_addresses' - sendemail.multiedit:'edit all files at once::->bool:false' + sendemail.multiedit:'edit all files at once::->bool:true' sendemail.signedoffbycc:'add Signed-off-by\: or Cc\: lines to Cc\: header::->bool:true' sendemail.smtppass:'password to use for SMTP-AUTH:password:->string' sendemail.suppresscc:'rules for suppressing Cc\:::->sendemail.suppresscc' -- cgit v1.2.3 From 2c1affc6c10fb59ed900d5dc5bf146a0b9851890 Mon Sep 17 00:00:00 2001 From: m0viefreak Date: Sun, 20 Oct 2013 19:41:04 +0200 Subject: 31856: _git: fix a few "undocumented" options commit: '--null' is documented relink: '-h,--help' are never documented for subcommands but always exist verify-tag: '-v,--verbose' are documented with updated description diff: '--cumulative' is deprecated -> remove --- ChangeLog | 5 +++++ Completion/Unix/Command/_git | 9 ++------- 2 files changed, 7 insertions(+), 7 deletions(-) (limited to 'Completion/Unix/Command/_git') diff --git a/ChangeLog b/ChangeLog index 8753fa1b5..61743a9f1 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2013-10-21 m0viefreak + + * 31856: Completion/Unix/Command/_git: _git: fix a few + "undocumented" options + 2013-10-21 Øystein Walle * 31858: Completion/Unix/Command/_git: _git: fix wrong default diff --git a/Completion/Unix/Command/_git b/Completion/Unix/Command/_git index a75ce5c76..6f631bced 100644 --- a/Completion/Unix/Command/_git +++ b/Completion/Unix/Command/_git @@ -624,7 +624,6 @@ _git-commit () { reset_author_opt='(--author)--reset-author[make committer the author of the commit]' fi - # TODO: --null is an undocumented alias. # TODO: --interactive isn’t explicitly listed in the documentation. _arguments -w -S -s \ '(-a --all --interactive -o --only -i --include *)'{-a,--all}'[stage all modified and deleted paths]' \ @@ -2978,10 +2977,9 @@ _git-reflog () { (( $+functions[_git-relink] )) || _git-relink () { - # TODO: --help is undocumented. _arguments \ '--safe[stop if two objects with the same hash exist but have different sizes]' \ - '--help[display help]' \ + '(-)'{-h,--help}'[display usage information]' \ ': :_directories' \ ': :_directories' \ '*: :_directories' @@ -3419,9 +3417,8 @@ _git-show-branch () { (( $+functions[_git-verify-tag] )) || _git-verify-tag () { - # TODO: -v and --verbose are undocumented. _arguments -w -S -s \ - '(-v --verbose)'{-v,--verbose}'[output additional information]' \ + '(-v --verbose)'{-v,--verbose}'[print the contents of the tag object before validating it]' \ '*: :__git_tags' } @@ -5960,8 +5957,6 @@ __git_setup_diff_options () { '(-0 -1 -2 -3 --base --ours --theirs -c --cc --no-index)-0[omit diff output for unmerged entries]' '(-0 -1 -2 -3 --base --ours --theirs -c --cc --no-index)'{-c,--cc}'[compare "our branch", "their branch" and working tree files]' - # TODO: --cumulative is undocumented. - '--cumulative[undocumented]' # TODO: --output is undocumented. '--output[undocumented]:undocumented') } -- cgit v1.2.3 From 7a37568b8c6a142e9ccbae3a96fb6041a46646f5 Mon Sep 17 00:00:00 2001 From: m0viefreak Date: Sun, 20 Oct 2013 19:41:05 +0200 Subject: 31855: _git: revert: add '-e,--edit' --- ChangeLog | 3 +++ Completion/Unix/Command/_git | 3 ++- 2 files changed, 5 insertions(+), 1 deletion(-) (limited to 'Completion/Unix/Command/_git') diff --git a/ChangeLog b/ChangeLog index 61743a9f1..e98598fd0 100644 --- a/ChangeLog +++ b/ChangeLog @@ -3,6 +3,9 @@ * 31856: Completion/Unix/Command/_git: _git: fix a few "undocumented" options + * 31855: Completion/Unix/Command/_git: _git: revert: add + '-e,--edit' + 2013-10-21 Øystein Walle * 31858: Completion/Unix/Command/_git: _git: fix wrong default diff --git a/Completion/Unix/Command/_git b/Completion/Unix/Command/_git index 6f631bced..db1ff2f3f 100644 --- a/Completion/Unix/Command/_git +++ b/Completion/Unix/Command/_git @@ -1320,8 +1320,9 @@ _git-revert () { '(- :)--quit[end revert or cherry-pick sequence]' \ '(- :)--continue[resume revert or cherry-pick sequence]' \ '(- :)--abort[cancel revert or cherry-pick sequence]' \ + '(-e --edit --no-edit)'{-e,--edit}'[edit the commit before committing the revert]' \ + '(-e --edit --no-edit)--no-edit[do not edit the commit message before committing the revert]' \ '(-m --mainline)'{-m+,--mainline=}'[pick which parent is mainline]:parent number' \ - '(-e --edit)--no-edit[do not edit the commit message]' \ '(-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]' \ ': :__git_commits' -- cgit v1.2.3 From e91d90125beb975ae49b9445477c6cae61b286f7 Mon Sep 17 00:00:00 2001 From: Øystein Walle Date: Sun, 20 Oct 2013 19:43:29 +0200 Subject: 31861: _git: Add git-clean -i/--interactive support - Add -i and --interactive to _git-clean() - Add column.clean configuration variable --- ChangeLog | 5 +++++ Completion/Unix/Command/_git | 2 ++ 2 files changed, 7 insertions(+) (limited to 'Completion/Unix/Command/_git') diff --git a/ChangeLog b/ChangeLog index e98598fd0..a6e1479bb 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2013-10-21 Øystein Walle + + * 31861: Completion/Unix/Command/_git: _git: Add git-clean + -i/--interactive support + 2013-10-21 m0viefreak * 31856: Completion/Unix/Command/_git: _git: fix a few diff --git a/Completion/Unix/Command/_git b/Completion/Unix/Command/_git index db1ff2f3f..25f925f78 100644 --- a/Completion/Unix/Command/_git +++ b/Completion/Unix/Command/_git @@ -508,6 +508,7 @@ _git-clean () { _arguments -w -C -S -s \ '-d[also remove untracked directories]' \ '(-f --force)'{-f,--force}'[required when clean.requireForce is true (default)]' \ + '(-i --interactive)'{-i,--interactive}'[show what would be done and clean files interactively]' \ '(-n --dry-run)'{-n,--dry-run}'[only show what would and what would not be removed]' \ '(-q --quiet)'{-q,--quiet}'[only report errors]' \ '*'{-e,--exclude=}'[skip files matching specified pattern]:pattern' \ @@ -1803,6 +1804,7 @@ _git-config () { cvsexportcommit.cvsdir:'the default location of the CVS checkout to use for the export:cvs export dir:_directories' column.ui:'specify whether supported commands should output in columns.::->column:never' column.branch:'specify whether to output branch listing in git branch in columns::->column:never' + column.clean:'specify the layout when listing items in git clean -i::->column:never' column.status:'specify whether to output untracked files in git status in columns::->column:never' column.tag:'specify whether to output tag listing in git tag in columns::->column:never' core.fileMode:'track changes to the executable bit of files::->bool:true' -- cgit v1.2.3 From 805b6659019ae5ab7bfe9b7e78f48f35db568f9d Mon Sep 17 00:00:00 2001 From: Øystein Walle Date: Sun, 20 Oct 2013 19:43:30 +0200 Subject: 31863: _git: Add new arguments introduced in Git v1.8.4 --- ChangeLog | 3 +++ Completion/Unix/Command/_git | 13 ++++++++++--- 2 files changed, 13 insertions(+), 3 deletions(-) (limited to 'Completion/Unix/Command/_git') diff --git a/ChangeLog b/ChangeLog index a6e1479bb..62af20e16 100644 --- a/ChangeLog +++ b/ChangeLog @@ -3,6 +3,9 @@ * 31861: Completion/Unix/Command/_git: _git: Add git-clean -i/--interactive support + * 31863: Completion/Unix/Command/_git: _git: Add new arguments + introduced in Git v1.8.4 + 2013-10-21 m0viefreak * 31856: Completion/Unix/Command/_git: _git: fix a few diff --git a/Completion/Unix/Command/_git b/Completion/Unix/Command/_git index 25f925f78..5b1e71063 100644 --- a/Completion/Unix/Command/_git +++ b/Completion/Unix/Command/_git @@ -684,6 +684,7 @@ _git-describe () { '(--abbrev)--long[always show full format, even for exact matches]' \ '--match=[only consider tags matching glob pattern]:pattern' \ '--always[show uniquely abbreviated commit object as fallback]' \ + '--first-parent[follow only the first parent of merge commits]' \ '*: :__git_committishs' } @@ -835,6 +836,7 @@ _git-format-patch () { '(-k --keep-subject)--subject-prefix=[use the given prefix instead of \[PATCH\]]:prefix' \ '*--to=[add To: header to email headers]: :_email_addresses' \ '*--cc=[add Cc: header to email headers]: :_email_addresses' \ + '--from=[add From: header to email headers]: :_email_addresses' \ '*--add-header=[add an arbitrary header to email headers]:header' \ '--cover-letter[generate a cover letter template]' \ '--notes=[append notes for the commit after the three-dash line]:: :__git_notes_refs' \ @@ -1050,6 +1052,7 @@ _git-log () { $log_options \ $revision_options \ $diff_options \ + '-L+[trace the evolution of a line range or regex within a file]:range' \ '(-)--[start file arguments]' \ '*:: :->commit-range-or-file' && ret=0 @@ -1241,6 +1244,7 @@ _git-push () { '(-q --quiet -v --verbose --progress)'{-q,--quiet}'[suppress all output]' \ '(-q --quiet -v --verbose)'{-v,--verbose}'[output additional information]' \ '(-q --quiet)--progress[output progress information]' \ + '(--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"))' \ ':: :__git_any_repositories' \ @@ -5884,13 +5888,14 @@ __git_setup_log_options () { (( $+functions[__git_setup_diff_options] )) || __git_setup_diff_options () { - local diff_types='(-p -u --patch -U --unified --raw --patch-with-raw --stat --numstat --shortstat --dirstat --dirstat-by-file --summary --patch-with-stat --name-only --name-status --cumulative)' + local diff_types='(-p -u --patch -U --unified --raw --patch-with-raw --stat --numstat --shortstat --dirstat --dirstat-by-file --summary --patch-with-stat --name-only --name-status --cumulative -s --no-patch)' diff_options=( $diff_types{-p,-u,--patch}'[generate diff in patch format]' $diff_types{-U,--unified=}'[generate diff with given lines of context]: :__git_guard_number lines' $diff_types'--raw[generate default raw diff output]' $diff_types'--patch-with-raw[generate patch but also keep the default raw diff output]' + $diff_types{-s,--no-patch}'[suppress diff output]' '(--minimal --patience --histogram --diff-algorithm)--minimal[spend extra time to make sure the smallest possible diff is producedm]' '(--minimal --patience --histogram --diff-algorithm)--patience[generate diffs with patience algorithm]' '(--minimal --patience --histogram --diff-algorithm)--histogram[generate diffs with histogram algorithm]' @@ -5942,6 +5947,7 @@ __git_setup_diff_options () { '--ignore-space-at-eol[ignore changes in whitespace at end of line]' '(-b --ignore-space-change -w --ignore-all-space)'{-b,--ignore-space-change}'[ignore changes in amount of white space]' '(-b --ignore-space-change -w --ignore-all-space)'{-w,--ignore-all-space}'[ignore white space when comparing lines]' + '--ignore-blank-lines[do not show hunks that add or remove blank lines]' '--inter-hunk-context=[combine hunks closer than n lines]:n' '--exit-code[report exit code 1 if differences, 0 otherwise]' '(--exit-code)--quiet[disable all output]' @@ -6035,8 +6041,9 @@ __git_setup_revision_options () { '(--full-history --dense --simplify-merges --ancestry-path)--sparse[when paths are given, display only commits that changes any of them]' '(--full-history --dense --sparse --ancestry-path)--simplify-merges[milder version of --full-history]' '(--full-history --dense --sparse --simplify-merges )--ancestry-path[only display commits that exists directly on ancestry chains]' - '( --date-order)--topo-order[display commits in topological order]' - '(--topo-order )--date-order[display commits in date order]' + '( --date-order --author-date-order)--topo-order[display commits in topological order]' + '(--topo-order --author-date-order)--date-order[display commits in date order]' + '(--topo-order --date-order )--author-date-order[display commits in auhor date order]' '(-g --walk-reflogs)--reverse[display commits in reverse order]' '( --objects-edge)--objects[display object ids of objects referenced by listed commits]' '(--objects )--objects-edge[display object ids of objects referenced by listed and excluded commits]' -- cgit v1.2.3 From baee0a2295c7d6de79c7aa576c5a7cea30c9fd5d Mon Sep 17 00:00:00 2001 From: Øystein Walle Date: Sun, 20 Oct 2013 19:43:31 +0200 Subject: 31862: _git: Add status.short and status.branch --- ChangeLog | 3 +++ Completion/Unix/Command/_git | 2 ++ 2 files changed, 5 insertions(+) (limited to 'Completion/Unix/Command/_git') diff --git a/ChangeLog b/ChangeLog index 62af20e16..0dbf17111 100644 --- a/ChangeLog +++ b/ChangeLog @@ -6,6 +6,9 @@ * 31863: Completion/Unix/Command/_git: _git: Add new arguments introduced in Git v1.8.4 + * 31862: Completion/Unix/Command/_git: _git: Add status.short and + status.branch + 2013-10-21 m0viefreak * 31856: Completion/Unix/Command/_git: _git: fix a few diff --git a/Completion/Unix/Command/_git b/Completion/Unix/Command/_git index 5b1e71063..eb2da110b 100644 --- a/Completion/Unix/Command/_git +++ b/Completion/Unix/Command/_git @@ -2199,6 +2199,8 @@ _git-config () { status.relativePaths:'show paths relative to current directory::->bool:false' status.showUntrackedFiles:'show untracked files::->status.showUntrackedFiles:normal' status.submodulesummary:'include submodule summary::->bool:false' + status.branch:'show branch and tracking info in short format::->bool:false' + status.short:'use short format by default::->bool:false' 'submodule.*.branch:remote branch name for a submodule:branch name:->string' 'submodule.*.fetchRecurseSubmodules:fetch commits of submodules::->bool' 'submodule.*.path:path within project:submodule directory:_directories -qS \:' -- cgit v1.2.3 From 32ffba1214dcc18c4fb39dbad82ed0c6bb3ba41e Mon Sep 17 00:00:00 2001 From: Øystein Walle Date: Sun, 20 Oct 2013 19:43:32 +0200 Subject: 31866: _git: Reword --heads to match new meaning --- ChangeLog | 3 +++ Completion/Unix/Command/_git | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) (limited to 'Completion/Unix/Command/_git') diff --git a/ChangeLog b/ChangeLog index 0dbf17111..1821dbb9f 100644 --- a/ChangeLog +++ b/ChangeLog @@ -9,6 +9,9 @@ * 31862: Completion/Unix/Command/_git: _git: Add status.short and status.branch + * 31866: Completion/Unix/Command/_git: _git: Reword --heads to + match new meaning + 2013-10-21 m0viefreak * 31856: Completion/Unix/Command/_git: _git: fix a few diff --git a/Completion/Unix/Command/_git b/Completion/Unix/Command/_git index eb2da110b..36e97071e 100644 --- a/Completion/Unix/Command/_git +++ b/Completion/Unix/Command/_git @@ -4429,7 +4429,7 @@ _git-show-ref () { - list \ '(-h --head)'{-h,--head}'[show HEAD reference]' \ '--tags[show only refs/tags]' \ - '--heads[show only refs/heads]' \ + '--heads[show only HEAD and refs under refs/heads]' \ '(-d --dereference)'{-d,--dereference}'[dereference tags into object IDs as well]' \ '(-s --hash)'{-s+,--hash=-}'[only show the SHA-1 hash, not the reference name]:: :__git_guard_number length' \ '--verify[enable stricter reference checking]' \ -- cgit v1.2.3 From 3d77fa789d80d361d07ede1c2588500742fc2860 Mon Sep 17 00:00:00 2001 From: Øystein Walle Date: Sun, 20 Oct 2013 19:43:33 +0200 Subject: 31864: _git: Add two sub-comamnds introduced in v1.8.4 Add _git-check-ignore() and _git-check-mailmap() --- ChangeLog | 3 +++ Completion/Unix/Command/_git | 19 +++++++++++++++++++ 2 files changed, 22 insertions(+) (limited to 'Completion/Unix/Command/_git') diff --git a/ChangeLog b/ChangeLog index 1821dbb9f..f74855eba 100644 --- a/ChangeLog +++ b/ChangeLog @@ -12,6 +12,9 @@ * 31866: Completion/Unix/Command/_git: _git: Reword --heads to match new meaning + * 31864: Completion/Unix/Command/_git: _git: Add two sub-comamnds + introduced in v1.8.4 + 2013-10-21 m0viefreak * 31856: Completion/Unix/Command/_git: _git: fix a few diff --git a/Completion/Unix/Command/_git b/Completion/Unix/Command/_git index 36e97071e..0f41acb32 100644 --- a/Completion/Unix/Command/_git +++ b/Completion/Unix/Command/_git @@ -399,6 +399,23 @@ _git-bundle () { return ret } +(( $+functions[_git-check-ignore] )) || +_git-check-ignore () { + _arguments \ + '(-q --quiet)'{-q,--quiet}'[do not output anything, just set exit status]' \ + '(-v --verbose)'{-v,--verbose}'[output details about the matching pattern (if any) for each pathname]' \ + '--stdin[read file names from stdin instead of from the command-line]' \ + '-z[make output format machine-parseable]' \ + '(-n --non-matching)'{-n,--non-matching}'[show given paths which do not match any pattern]' \ + '*:: :->file' && ret=0 +} + +(( $+functions[_git-check-mailmap] )) || +_git-check-mailmap () { + _arguments \ + '--stdin[read contacts from stdin after those given on the command line]' +} + (( $+functions[_git-checkout] )) || _git-checkout () { # TODO: __git_tree_ishs is just stupid. It should be giving us a list of tags @@ -5008,6 +5025,8 @@ _git_commands () { local -a plumbing_internal_helper_commands plumbing_internal_helper_commands=( check-attr:'display gitattributes information' + check-ignore:'debug gitignore/exclude files' + check-mailmap:'show canonical names and email addresses of contacts' check-ref-format:'ensure that a reference name is well formed' fmt-merge-msg:'produce merge commit message' mailinfo:'extract patch and authorship from a single email message' -- cgit v1.2.3 From 95a5ca90d9fbc925157471dd38437d8a16b853b1 Mon Sep 17 00:00:00 2001 From: Øystein Walle Date: Sun, 20 Oct 2013 19:43:34 +0200 Subject: 31865: _git: Make --batch(-check) accept an argument Also reword the explanation slightly to make it more compact since more explanation is needed. --- ChangeLog | 3 +++ Completion/Unix/Command/_git | 4 ++-- 2 files changed, 5 insertions(+), 2 deletions(-) (limited to 'Completion/Unix/Command/_git') diff --git a/ChangeLog b/ChangeLog index f74855eba..0f78b8363 100644 --- a/ChangeLog +++ b/ChangeLog @@ -15,6 +15,9 @@ * 31864: Completion/Unix/Command/_git: _git: Add two sub-comamnds introduced in v1.8.4 + * 31865: Completion/Unix/Command/_git: _git: Make --batch(-check) + accept an argument + 2013-10-21 m0viefreak * 31856: Completion/Unix/Command/_git: _git: fix a few diff --git a/Completion/Unix/Command/_git b/Completion/Unix/Command/_git index 0f41acb32..119a705f6 100644 --- a/Completion/Unix/Command/_git +++ b/Completion/Unix/Command/_git @@ -4192,8 +4192,8 @@ _git-cat-file () { '(- 1)-e[exit with zero status if object exists]' \ '(- 1)-p[pretty-print given object]' \ '(- 1)--textconv[show content as transformed by a textconv filter]' \ - '(- :)--batch[print SHA1, type, size, and contents of each object provided on stdin]' \ - '(- :)--batch-check[print SHA1, type, and size of each object provided on stdin]' \ + '(- :)--batch=-[print SHA1, type, size and contents (or in ) of objects given on stdin]:format' \ + '(- :)--batch-check=-[print SHA1, type and size (or in ) of objects given on stdin]:format' \ '(-):object type:(blob commit tag tree)' \ ': :__git_objects' } -- cgit v1.2.3