Skip to content

Commit 9c70bee

Browse files
committed
update git completion
1 parent ea95cd2 commit 9c70bee

File tree

1 file changed

+52
-4
lines changed
  • Completion/Unix/Command

1 file changed

+52
-4
lines changed

Completion/Unix/Command/_git

Lines changed: 52 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -362,7 +362,7 @@ _git-branch () {
362362
"($l $m $d -f --force)"{-f,--force}'[force the creation of a new branch]' \
363363
"($l $m $d --track)-t[setup configuration so that pull merges from the start point]" \
364364
"($l $m $d -t)--track=-[setup configuration so that pull merges from the start point]::upstream tracking:(direct inherit)" \
365-
"($l $m $d)--no-track[override the branch.autosetupmerge configuration variable]" \
365+
"($l $m $d)--no-track[override the branch.autoSetupMerge configuration variable]" \
366366
"($l $m $d -u --set-upstream --set-upstream-to --unset-upstream)"{-u+,--set-upstream-to=}'[set up configuration so that pull merges]:remote branch:__git_remote_branch_names' \
367367
"($l $m $d -u --set-upstream --set-upstream-to --unset-upstream)--unset-upstream[remove upstream configuration]" \
368368
"($l $m $d)*--contains=[only list branches that contain the specified commit]: :__git_committishs" \
@@ -500,7 +500,7 @@ _git-checkout () {
500500
'(--orphan -2 --ours -3 --theirs --conflict -p --patch -U --unified --inter-hunk-context -d --detach)-l[create reflog for new branch]' \
501501
'(--track --no-track --orphan -p --patch -U --unified --inter-hunk-context -d --detach)-t[set upstream info for new branch]' \
502502
'(-t --no-track --orphan -p --patch -U --unified --inter-hunk-context -d --detach)--track=-[set upstream info for new branch]::configuration:(direct inherit)' \
503-
'(-p --patch -U --unified --inter-hunk-context)--no-track[override the branch.autosetupmerge configuration variable]' \
503+
'(-p --patch -U --unified --inter-hunk-context)--no-track[override the branch.autoSetupMerge configuration variable]' \
504504
$new_branch_reflog_opt \
505505
'(-b -B -t --track -p --patch -U --unified --inter-hunk-context --orphan -d --detach)'{-d,--detach}'[detach the HEAD at named commit]' \
506506
'(-b -B -t --track -p --patch -U --unified --inter-hunk-context -d --detach)--orphan=[create a new orphan branch based at given commit]: :__git_branch_names' \
@@ -2667,6 +2667,10 @@ __git_config_option-or-value () {
26672667
'branch.*.description:branch description:branch description:->string'
26682668
branch.sort:"default sorting order for 'git branch' output::__git_ref_sort_keys"
26692669
checkout.defaultRemote:'assumed remote name when specifying an unqualified remote branch name:remote name:__git_remotes'
2670+
checkout.guess:'provides the default value for the --guess or --no-guess option in git checkout and git switch::->bool:true'
2671+
checkout.workers:'the number of parallel workers to use when updating the working tree::->int:1'
2672+
checkout.thresholdForParallelism:'the minimum number of files for which parallel checkout should be attempted::->int:100'
2673+
clone.defaultRemoteName:'the name of the remote to create when cloning a repository::->string:origin'
26702674
cvsexportcommit.cvsdir:'the default location of the CVS checkout to use for the export:cvs export dir:_directories'
26712675
column.ui:'specify whether supported commands should output in columns.::->column:never'
26722676
column.branch:'specify whether to output branch listing in git branch in columns::_git_column_layouts:never'
@@ -2733,8 +2737,8 @@ __git_config_option-or-value () {
27332737
am.keepcr:'keep CR characters when splitting mails::->bool:false'
27342738
apply.ignorewhitespace:'ignore whitespace changes::->apply.ignorewhitespace:no'
27352739
apply.whitespace:'default value for the --whitespace option::->apply.whitespace:error'
2736-
branch.autosetupmerge:'set up new branches for git pull::->bool:true'
2737-
branch.autosetuprebase:'rebase new branches of merge for autosetupmerge::->branch.autosetuprebase:never'
2740+
branch.autoSetupMerge:'tells git branch, git switch and git checkout to set up new branches so that git-pull(1) will appropriately merge from the starting point branch::->branch.autoSetupMerge:true'
2741+
branch.autosetuprebase:'rebase new branches of merge for autoSetupMerge::->branch.autosetuprebase:never'
27382742
'branch.*.remote:what remote git fetch and git push should fetch form/push to::__git_remotes'
27392743
'branch.*.merge:default refspec to be marked for merging::__git_remote_references'
27402744
'branch.*.mergeoptions:default options for merging::->branch.mergeoptions'
@@ -2801,6 +2805,7 @@ __git_config_option-or-value () {
28012805
commit.template:'template file for commit messages:template:_files'
28022806
'diff.*.binary:make the diff driver treat files as binary::->bool:false'
28032807
'diff.*.cachetextconv:make the diff driver cache the text conversion outputs::->bool:false'
2808+
'diff.*.trustExitCode:expect diff.external command to return exit code 0 if it considers the input files to be equal or 1 if it considers them to be different::->bool:false'
28042809
'diff.*.command:custom diff driver command::_cmdstring'
28052810
'diff.*.textconv:command to generate the text-converted version of a file::_cmdstring'
28062811
'diff.*.wordregex:regular expression that the diff driver should use to split words in a line:regular expression:->string'
@@ -2820,6 +2825,7 @@ __git_config_option-or-value () {
28202825
diff.orderfile:'file to read patch order glob patterns from:order file:_files'
28212826
diff.renameLimit:'number of files to consider when detecting copy/renames:limit (number of files):->int'
28222827
diff.renames:'try to detect renames::->diff.renames:true'
2828+
diff.trustExitCode:'expect diff.external command to return exit code 0 if it considers the input files to be equal or 1 if it considers them to be different::->bool:false'
28232829
diff.ignoreSubmodules:'ignore submodules::->bool:false'
28242830
diff.statNameWidth:'limit on width of filename part in --stat output:width:->int'
28252831
diff.statGraphWidth:'width of the graph part in --stat output:width:->int'
@@ -2965,6 +2971,7 @@ __git_config_option-or-value () {
29652971
http.getanyfile:'allow clients to read any file within repository::->bool:true'
29662972
http.uploadpack:'serve git fetch-pack and git ls-remote clients::->bool:true'
29672973
http.receivepack:'serve git send-pack clients::->bool:true'
2974+
http.proxyAuthMethod:'method with which to authenticate against the HTTP proxy::->http.proxyAuthMethod:anyauth'
29682975
'http.*.cookiefile:file containing cookie lines which should be used in the Git http session::_files'
29692976
'http.*.lowSpeedLimit:limit controlling when to abort an HTTP transfer:speed limit:->int'
29702977
'http.*.lowSpeedTime:limit controlling when to abort an HTTP transfer:time limit (seconds):->int'
@@ -3059,11 +3066,13 @@ __git_config_option-or-value () {
30593066
pull.octopus:'default merge strategy to use when pulling multiple branches::__git_merge_strategies'
30603067
pull.rebase:'rebase branches on top of the fetched branch, instead of merging::->pull.rebase:false'
30613068
pull.twohead:'default merge strategy to use when pulling a single branch::__git_merge_strategies'
3069+
push.autoSetupRemote:'assume --set-upstream on default push when no upstream tracking exists for the current branch::->bool:false'
30623070
push.default:'action git push should take if no refspec is given::->push.default:simple'
30633071
push.followTags:'enable --follow-tags option by default::->bool:false'
30643072
push.gpgSign:'GPG-sign pushes::->bool:false'
30653073
push.recurseSubmodules:'ensure all submodule commits are available on a remote-tracking branch'
30663074
push.pushOption:'transmit strings to server to pass to pre/post-receive hooks::->string'
3075+
push.useForceIfIncludes:'assume --force-if-includes as an option to git-push::->bool:false'
30673076
rebase.stat:'show a diffstat of what changed upstream since last rebase::->bool:false'
30683077
rebase.autoSquash:'autosquash by default::->bool:false'
30693078
rebase.autoStash:'autostash by default::->bool:false'
@@ -3087,6 +3096,7 @@ __git_config_option-or-value () {
30873096
'remote.*.promisor:use this remote to fetch promisor objects::->bool:false'
30883097
'remote.*.pushurl:push URL of a remote repository::__git_any_repositories'
30893098
'remote.*.proxy:URL of proxy to use for a remote repository::_urls'
3099+
'remote.*.proxyAuthMethod:method to use for authenticating against the proxy in use::->http.proxyAuthMethod:anyauth'
30903100
"remote.*.pruneTags:maintain one-to-one correspondence with remote's tag refs::->bool:false"
30913101
'remote.*.prune:remove any remote tracking branches that no longer exist remotely::->bool:false'
30923102
'remote.*.fetch:default set of refspecs for git fetch::__git_ref_specs_fetchy'
@@ -3105,6 +3115,8 @@ __git_config_option-or-value () {
31053115
rerere.autoupdate:'update index after resolution::->bool:false'
31063116
rerere.enabled:'record resolved conflicts::->bool'
31073117
reset.quiet:'pass --quiet by default::->bool:false'
3118+
safe.bareRepository:'specifies which bare repositories Git will work with::->safe.bareRepository:all'
3119+
safe.directory:'specify Git-tracked directories that are considered safe even if they are owned by someone other than the current user::_path_files -/'
31083120
sendemail.identity:'default identity::__git_sendemail_identities'
31093121
sendemail.smtpencryption:'encryption method to use::->sendemail.smtpencryption'
31103122
sendemail.aliasesfile:'file containing email aliases:email aliases file:_files'
@@ -3162,6 +3174,10 @@ __git_config_option-or-value () {
31623174
sendemail.assume8bitEncoding:'encoding to use for non-ASCII messages::__git_encodings'
31633175
sequence.editor:'text editor used by git rebase -i::_cmdstring'
31643176
showbranch.default:'default set of branches for git show-branch::->branch'
3177+
stash.index:'implicitly supply --index to git stash apply and pop::->bool:false'
3178+
stash.showIncludeUntracked:'show the untracked files of a stash entry::->bool:false'
3179+
stash.showPatch:'show the stash entry in patch form::->bool:false'
3180+
stash.showStat:'show a diffstat of the stash entry::->bool:true'
31653181
status.aheadBehind:"display detailed ahead/behind counts relative to upstream branch::->bool:true"
31663182
status.relativePaths:'show paths relative to current directory::->bool:false'
31673183
status.showStash:'show number of stashes::->bool:false'
@@ -3177,7 +3193,11 @@ __git_config_option-or-value () {
31773193
'submodule.*.url:URL to update from::__git_any_repositories'
31783194
'submodule.*.update:update strategy to use::->submodule.update:none'
31793195
'submodule.*.ignore:ignore modifications to submodules with git status and git diff-*::->submodule.ignore'
3196+
'submodule.*.active:the submodule is of interest to git commands::->bool:true'
31803197
submodule.recurse:'recurse into submodules by default (for most git commands)::->bool:false'
3198+
submodule.fetchJobs:'how many submodules are fetched/cloned at the same time::->int:1'
3199+
submodule.alternateLocation:'how the submodules obtain alternates when submodules are cloned::->submodule.alternateLocation:no'
3200+
submodule.alternateErrorStrategy:'how to treat errors with the alternates for a submodule as computed via submodule.alternateLocation::->submodule.alternateErrorStrategy:die'
31813201
ssh.variant:'SSH command flavour:flavour id:compadd ssh simple plink putty tortoiseplink'
31823202
svn.noMetadata:'disable git-svn-id: lines at end of commits::->bool:false'
31833203
svn.useSvmProps:'use remappings of URLs and UUIDs from mirrors::->bool:false'
@@ -3220,6 +3240,7 @@ __git_config_option-or-value () {
32203240
versionsort.suffix:'specify sort order of suffixes applied to tags:suffix'
32213241
web.browser:'web browser to use::__git_browsers'
32223242
worktree.guessRemote:'with add, if branch matches remote track it::->bool:true'
3243+
worktree.useRelativePaths:'use relative path::->bool:false'
32233244

32243245
{fetch.fsck.skipList,receive.fsck.skipList,fsck.skipList}:'ignore objects broken in a non-fatal way:path to a list of objects:_files'
32253246
)
@@ -3467,8 +3488,10 @@ __git_config_option-or-value () {
34673488
remotes:'remotes groups'
34683489
repack:'repack options'
34693490
rerere:'git rerere options'
3491+
safe:'safe directories'
34703492
sendemail:'git send-email options'
34713493
showbranch:'showbranch options'
3494+
stash:'git stash options'
34723495
status:'git status options'
34733496
submodule:'git submodule options'
34743497
tar:'git tar-tree options'
@@ -3565,6 +3588,14 @@ __git_config_option-or-value () {
35653588
(branch)
35663589
__git_branch_names && ret=0
35673590
;;
3591+
(branch.autoSetupMerge)
3592+
__git_config_values -- "$current" "$parts[5]" \
3593+
false:'no automatic setup is done' \
3594+
true:'automatic setup is done when the starting point is a remote-tracking branch' \
3595+
always:'automatic setup is done when the starting point is either a local branch or remote-tracking branch' \
3596+
inherit:'if the starting point has a tracking configuration, it is copied to the new branch' \
3597+
simple:'automatic setup is done only when the starting point is a remote-tracking branch and the new branch has the same name as the remote branch.' && ret=0
3598+
;;
35683599
(branch.autosetuprebase)
35693600
__git_config_values -- "$current" "$parts[5]" \
35703601
never:'never set branch.*.rebase to true' \
@@ -3727,6 +3758,10 @@ __git_config_option-or-value () {
37273758
'path::_files -/' \
37283759
'url::_urls' && ret=0
37293760
;;
3761+
(http.proxyAuthMethod)
3762+
__git_config_values -- "$current" "$parts[5]" \
3763+
anyauth: basic: digest: negotiate: ntlm: && ret=0
3764+
;;
37303765
(imap.authMethod)
37313766
__git_config_values -- "$current" "$parts[5]" \
37323767
CRAM-MD5:'use CRAM-MD5' && ret=0
@@ -3790,6 +3825,11 @@ __git_config_option-or-value () {
37903825
--tags:'automatically follow tags' \
37913826
--no-tags:'do not automatically follow tags' && ret=0
37923827
;;
3828+
(safe.bareRepository)
3829+
__git_config_values -- "$current" "$parts[5]" \
3830+
all:'all bare repositories' \
3831+
explicit:'bare repositories specified via the top-level --git-dir command-line option, or the GIT_DIR environment variable' && ret=0
3832+
;;
37933833
(sendemail.aliasfiletype)
37943834
__git_config_values -- "$current" "$parts[5]" \
37953835
elm:'elm(1)' \
@@ -3813,6 +3853,14 @@ __git_config_option-or-value () {
38133853
normal:'show untracked files and directories' \
38143854
all:'show all individual files in directories' && ret=0
38153855
;;
3856+
(submodule.alternateLocation)
3857+
__git_config_values -- "$current" "$parts[5]" \
3858+
no: superproject: && ret=0
3859+
;;
3860+
(submodule.alternateErrorStrategy)
3861+
__git_config_values -- "$current" "$parts[5]" \
3862+
ignore: info: die: && ret=0
3863+
;;
38163864
(refname|string)
38173865
# TODO: Something better?
38183866
if [[ -n $current ]]; then

0 commit comments

Comments
 (0)