<feed xmlns='http://www.w3.org/2005/Atom'>
<title>git/contrib/completion/git-completion.bash, branch v2.32.0</title>
<subtitle>Fork of git SCM with my patches.</subtitle>
<id>http://git.kilabit.info/git/atom?h=v2.32.0</id>
<link rel='self' href='http://git.kilabit.info/git/atom?h=v2.32.0'/>
<link rel='alternate' type='text/html' href='http://git.kilabit.info/git/'/>
<updated>2021-06-02T03:49:40Z</updated>
<entry>
<title>contrib/completion: fix zsh completion regression from 59d85a2a05</title>
<updated>2021-06-02T03:49:40Z</updated>
<author>
<name>David Aguilar</name>
<email>davvid@gmail.com</email>
</author>
<published>2021-06-01T20:52:29Z</published>
<link rel='alternate' type='text/html' href='http://git.kilabit.info/git/commit/?id=0b18023d000ed8c0851a025fcd4fd518cb2df673'/>
<id>urn:sha1:0b18023d000ed8c0851a025fcd4fd518cb2df673</id>
<content type='text'>
A recent change to make git-completion.bash use $__git_cmd_idx
in more places broke a number of completions on zsh because it
modified __git_main but did not update __git_zsh_main.

Notably, completions for "add", "branch", "mv" and "push" were
broken as a result of this change.

In addition to the undefined variable usage, "git mv &lt;tab&gt;" also
prints the following error:

	__git_count_arguments:7: bad math expression:
	operand expected at `"1"'

	_git_mv:[:7: unknown condition: -gt

Remove the quotes around $__git_cmd_idx in __git_count_arguments
and set __git_cmd_idx=1 early in __git_zsh_main to fix the
regressions from 59d85a2a05.

This was tested on zsh 5.7.1 (x86_64-apple-darwin19.0).

Suggested-by: Felipe Contreras &lt;felipe.contreras@gmail.com&gt;
Signed-off-by: David Aguilar &lt;davvid@gmail.com&gt;
Acked-by: Felipe Contreras &lt;felipe.contreras@gmail.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>Merge branch 'dd/mailinfo-quoted-cr'</title>
<updated>2021-05-16T12:05:23Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2021-05-16T12:05:23Z</published>
<link rel='alternate' type='text/html' href='http://git.kilabit.info/git/commit/?id=483932a3d8dae23207de8ec8683a5236ef3098d9'/>
<id>urn:sha1:483932a3d8dae23207de8ec8683a5236ef3098d9</id>
<content type='text'>
"git mailinfo" (hence "git am") learned the "--quoted-cr" option to
control how lines ending with CRLF wrapped in base64 or qp are
handled.

* dd/mailinfo-quoted-cr:
  am: learn to process quoted lines that ends with CRLF
  mailinfo: allow stripping quoted CR without warning
  mailinfo: allow squelching quoted CRLF warning
  mailinfo: warn if CRLF found in decoded base64/QP email
  mailinfo: stop parsing options manually
  mailinfo: load default metainfo_charset lazily
</content>
</entry>
<entry>
<title>am: learn to process quoted lines that ends with CRLF</title>
<updated>2021-05-10T06:06:22Z</updated>
<author>
<name>Đoàn Trần Công Danh</name>
<email>congdanhqx@gmail.com</email>
</author>
<published>2021-05-09T17:12:13Z</published>
<link rel='alternate' type='text/html' href='http://git.kilabit.info/git/commit/?id=59b519ab7e703ebdbad06bd9ba3cae6e55d880d0'/>
<id>urn:sha1:59b519ab7e703ebdbad06bd9ba3cae6e55d880d0</id>
<content type='text'>
In previous changes, mailinfo has learnt to process lines that decoded
from base64 or quoted-printable, and ends with CRLF.

Let's teach "am" that new trick, too.

Signed-off-by: Đoàn Trần Công Danh &lt;congdanhqx@gmail.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>Merge branch 'si/zsh-complete-comment-fix'</title>
<updated>2021-05-07T03:47:42Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2021-05-07T03:47:42Z</published>
<link rel='alternate' type='text/html' href='http://git.kilabit.info/git/commit/?id=70a890d42f6c8cb7c0bb2c10361857621c821195'/>
<id>urn:sha1:70a890d42f6c8cb7c0bb2c10361857621c821195</id>
<content type='text'>
Portability fix for command line completion script (in contrib/).

* si/zsh-complete-comment-fix:
  work around zsh comment in __git_complete_worktree_paths
</content>
</entry>
<entry>
<title>Merge branch 'dl/complete-stash-updates'</title>
<updated>2021-05-07T03:47:41Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2021-05-07T03:47:41Z</published>
<link rel='alternate' type='text/html' href='http://git.kilabit.info/git/commit/?id=18e1ba10927b15f66a32c86f61133e9adf79f9cf'/>
<id>urn:sha1:18e1ba10927b15f66a32c86f61133e9adf79f9cf</id>
<content type='text'>
Further update the command line completion (in contrib/) for "git
stash".

* dl/complete-stash-updates:
  git-completion.bash: consolidate cases in _git_stash()
  git-completion.bash: use $__git_cmd_idx in more places
  git-completion.bash: rename to $__git_cmd_idx
  git-completion.bash: separate some commands onto their own line
</content>
</entry>
<entry>
<title>Merge branch 'dl/complete-stash'</title>
<updated>2021-05-07T03:47:41Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2021-05-07T03:47:41Z</published>
<link rel='alternate' type='text/html' href='http://git.kilabit.info/git/commit/?id=848a17c274efc60a9043647baa7f6c8ac64b6041'/>
<id>urn:sha1:848a17c274efc60a9043647baa7f6c8ac64b6041</id>
<content type='text'>
The command line completion (in contrib/) for "git stash" has been
updated.

* dl/complete-stash:
  git-completion.bash: use __gitcomp_builtin() in _git_stash()
  git-completion.bash: extract from else in _git_stash()
  git-completion.bash: pass $__git_subcommand_idx from __git_main()
</content>
</entry>
<entry>
<title>work around zsh comment in __git_complete_worktree_paths</title>
<updated>2021-05-04T03:17:23Z</updated>
<author>
<name>Sardorbek Imomaliev</name>
<email>sardorbek.imomaliev@gmail.com</email>
</author>
<published>2021-05-03T16:29:07Z</published>
<link rel='alternate' type='text/html' href='http://git.kilabit.info/git/commit/?id=f2acf763e29a3696fef268a9e8dc421e807df7f2'/>
<id>urn:sha1:f2acf763e29a3696fef268a9e8dc421e807df7f2</id>
<content type='text'>
[PATCH]: contrib/completion/git-completion.bash, there is a construct
where comment lines are placed between the command that is on
the upstream of a pipe and the command that is on the downstream
of a pipe in __git_complete_worktree_paths function.

Unfortunately, this script is also used by Zsh completion, but
Zsh mishandles this construct when "interactive_comments" option is not
set (by default it is off on macOS), resulting in a breakage:

$ git worktree remove [TAB]
$ git worktree remove __git_complete_worktree_paths:7: command not found: #

Move the comment, even though it explains what happens on the
downstream of the pipe and logically belongs where it is right
now, before the entire pipeline, to work around this problem.

Signed-off-by: Sardorbek Imomaliev &lt;sardorbek.imomaliev@gmail.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>Merge branch 'vs/completion-with-set-u'</title>
<updated>2021-04-30T04:50:27Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2021-04-30T04:50:27Z</published>
<link rel='alternate' type='text/html' href='http://git.kilabit.info/git/commit/?id=5980e0d44258a6cccf1e5995947d4cba15145924'/>
<id>urn:sha1:5980e0d44258a6cccf1e5995947d4cba15145924</id>
<content type='text'>
Effort to make the command line completion (in contrib/) safe with
"set -u" continues.

* vs/completion-with-set-u:
  completion: avoid aliased command lookup error in nounset mode
</content>
</entry>
<entry>
<title>git-completion.bash: consolidate cases in _git_stash()</title>
<updated>2021-04-27T06:41:07Z</updated>
<author>
<name>Denton Liu</name>
<email>liu.denton@gmail.com</email>
</author>
<published>2021-04-22T10:00:52Z</published>
<link rel='alternate' type='text/html' href='http://git.kilabit.info/git/commit/?id=7cdb0969037418b6f09b0a434e51cbf66090c624'/>
<id>urn:sha1:7cdb0969037418b6f09b0a434e51cbf66090c624</id>
<content type='text'>
The $subcommand case statement in _git_stash() is quite repetitive.
Consolidate the cases together into one catch-all case to reduce the
repetition.

Signed-off-by: Denton Liu &lt;liu.denton@gmail.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>git-completion.bash: use $__git_cmd_idx in more places</title>
<updated>2021-04-27T06:41:07Z</updated>
<author>
<name>Denton Liu</name>
<email>liu.denton@gmail.com</email>
</author>
<published>2021-04-22T10:00:51Z</published>
<link rel='alternate' type='text/html' href='http://git.kilabit.info/git/commit/?id=59d85a2a0528c3db2552b0786caac7bf0610c552'/>
<id>urn:sha1:59d85a2a0528c3db2552b0786caac7bf0610c552</id>
<content type='text'>
With the introduction of the $__git_cmd_idx variable in e94fb44042
(git-completion.bash: pass $__git_subcommand_idx from __git_main(),
2021-03-24), completion functions were able to know the index at which
the git command is listed, allowing them to skip options that are given
to the underlying git itself, not the corresponding command (e.g.
`-C asdf` in `git -C asdf branch`).

While most of the changes here are self-explanatory, some bear further
explanation.

For the __git_find_on_cmdline() and __git_find_last_on_cmdline() pair of
functions, these functions are only ever called in the context of a git
command completion function. These functions will only care about words
after the command so we can safely ignore the words before this.

For _git_worktree(), this change is technically a no-op (once the
__git_find_last_on_cmdline change is also applied). It was in poor style
to have hard-coded on the index right after `worktree`. In case
`git worktree` were to ever learn to accept options, the current
situation would be inflexible.

Signed-off-by: Denton Liu &lt;liu.denton@gmail.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
</feed>
