<feed xmlns='http://www.w3.org/2005/Atom'>
<title>git/contrib/completion, branch v2.32.2</title>
<subtitle>Mirror of https://git.kernel.org/pub/scm/git/git.git/
</subtitle>
<id>https://git.shady.money/git/atom?h=v2.32.2</id>
<link rel='self' href='https://git.shady.money/git/atom?h=v2.32.2'/>
<link rel='alternate' type='text/html' href='https://git.shady.money/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='https://git.shady.money/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 'en/prompt-under-set-u'</title>
<updated>2021-05-19T23:55:00Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2021-05-19T23:55:00Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=02112fcb705c334311290e7699a6c0dca7585b8d'/>
<id>urn:sha1:02112fcb705c334311290e7699a6c0dca7585b8d</id>
<content type='text'>
The bash prompt script (in contrib/) did not work under "set -u".

* en/prompt-under-set-u:
  git-prompt: work under set -u
</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='https://git.shady.money/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>git-prompt: work under set -u</title>
<updated>2021-05-13T06:50:26Z</updated>
<author>
<name>Elijah Newren</name>
<email>newren@gmail.com</email>
</author>
<published>2021-05-13T06:22:36Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=5c0cbdb107c5e1c1474618535fda438f25d260ca'/>
<id>urn:sha1:5c0cbdb107c5e1c1474618535fda438f25d260ca</id>
<content type='text'>
Commit afda36dbf3 ("git-prompt: include sparsity state as well",
2020-06-21) added the use of some variables to control how to show
sparsity state in the git prompt, but implicitly assumed that undefined
variables would be treated as the empty string.  This breaks users who
run under 'set -u'; fix the code to be more explicit.

Signed-off-by: Elijah Newren &lt;newren@gmail.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</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='https://git.shady.money/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='https://git.shady.money/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='https://git.shady.money/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='https://git.shady.money/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='https://git.shady.money/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='https://git.shady.money/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>
</feed>
