<feed xmlns='http://www.w3.org/2005/Atom'>
<title>git/contrib/completion, branch v2.18.2</title>
<subtitle>Mirror of https://git.kernel.org/pub/scm/git/git.git/
</subtitle>
<id>https://git.shady.money/git/atom?h=v2.18.2</id>
<link rel='self' href='https://git.shady.money/git/atom?h=v2.18.2'/>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/'/>
<updated>2018-06-13T19:50:45Z</updated>
<entry>
<title>Merge branch 'sg/completion-zsh-workaround'</title>
<updated>2018-06-13T19:50:45Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2018-06-13T19:50:45Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=4d605b0f38775066be0eaed33c52e0b716035498'/>
<id>urn:sha1:4d605b0f38775066be0eaed33c52e0b716035498</id>
<content type='text'>
Work around zsh segfaulting when loading git-completion.zsh

* sg/completion-zsh-workaround:
  completion: correct zsh detection when run from git-completion.zsh
</content>
</entry>
<entry>
<title>completion: correct zsh detection when run from git-completion.zsh</title>
<updated>2018-06-12T17:13:44Z</updated>
<author>
<name>SZEDER Gábor</name>
<email>szeder.dev@gmail.com</email>
</author>
<published>2018-06-11T18:20:53Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=61d48c66ea7ef8acc0dd1114e0f79f4250aead38'/>
<id>urn:sha1:61d48c66ea7ef8acc0dd1114e0f79f4250aead38</id>
<content type='text'>
v2.18.0-rc0~90^2 (completion: reduce overhead of clearing cached
--options, 2018-04-18) worked around a bug in bash's "set" builtin on
MacOS by using compgen instead.  It was careful to avoid breaking zsh
by guarding this workaround with

	if [[ -n ${ZSH_VERSION-}} ]]

Alas, this interacts poorly with git-completion.zsh's bash emulation:

	ZSH_VERSION='' . "$script"

Correct it by instead using a new GIT_SOURCING_ZSH_COMPLETION shell
variable to detect whether git-completion.bash is being sourced from
git-completion.zsh.  This way, the zsh variant is used both when run
from zsh directly and when run via git-completion.zsh.

Reproduction recipe:

 1. cd git/contrib/completion &amp;&amp; cp git-completion.zsh _git
 2. Put the following in a new ~/.zshrc file:

 	autoload -U compinit; compinit
	autoload -U bashcompinit; bashcompinit
	fpath=(~/src/git/contrib/completion $fpath)

 3. Open zsh and "git &lt;TAB&gt;".

With this patch:
Triggers nice git-completion.bash based tab completion

Without:
 contrib/completion/git-completion.bash:354: read-only variable: QISUFFIX
 zsh:12: command not found: ___main
 zsh:15: _default: function definition file not found
 _dispatch:70: bad math expression: operand expected at `/usr/bin/g...'
 Segmentation fault

Reported-by: Rick van Hattem &lt;wolph@wol.ph&gt;
Reported-by: Dave Borowitz &lt;dborowitz@google.com&gt;
Signed-off-by: SZEDER Gábor &lt;szeder.dev@gmail.com&gt;
Signed-off-by: Jonathan Nieder &lt;jrnieder@gmail.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>Merge branch 'nd/command-list'</title>
<updated>2018-06-01T06:06:37Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2018-06-01T06:06:37Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=2289880f784326dc955f213072164539dcaf445e'/>
<id>urn:sha1:2289880f784326dc955f213072164539dcaf445e</id>
<content type='text'>
The list of commands with their various attributes were spread
across a few places in the build procedure, but it now is getting a
bit more consolidated to allow more automation.

* nd/command-list:
  completion: allow to customize the completable command list
  completion: add and use --list-cmds=alias
  completion: add and use --list-cmds=nohelpers
  Move declaration for alias.c to alias.h
  completion: reduce completable command list
  completion: let git provide the completable command list
  command-list.txt: documentation and guide line
  help: use command-list.txt for the source of guides
  help: add "-a --verbose" to list all commands with synopsis
  git: support --list-cmds=list-&lt;category&gt;
  completion: implement and use --list-cmds=main,others
  git --list-cmds: collect command list in a string_list
  git.c: convert --list-* to --list-cmds=*
  Remove common-cmds.h
  help: use command-list.h for common command list
  generate-cmds.sh: export all commands to command-list.h
  generate-cmds.sh: factor out synopsis extract code
</content>
</entry>
<entry>
<title>Merge branch 'sg/complete-paths'</title>
<updated>2018-05-30T05:04:08Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2018-05-30T05:04:08Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=4ce72180abe72dbb40f5e6a517deea814014e005'/>
<id>urn:sha1:4ce72180abe72dbb40f5e6a517deea814014e005</id>
<content type='text'>
Command line completion (in contrib/) learned to complete pathnames
for various commands better.

* sg/complete-paths:
  t9902-completion: exercise __git_complete_index_file() directly
  completion: don't return with error from __gitcomp_file_direct()
  completion: fill COMPREPLY directly when completing paths
  completion: improve handling quoted paths in 'git ls-files's output
  completion: remove repeated dirnames with 'awk' during path completion
  t9902-completion: ignore COMPREPLY element order in some tests
  completion: use 'awk' to strip trailing path components
  completion: let 'ls-files' and 'diff-index' filter matching paths
  completion: improve handling quoted paths on the command line
  completion: support completing non-ASCII pathnames
  completion: simplify prefix path component handling during path completion
  completion: move __git_complete_index_file() next to its helpers
  t9902-completion: add tests demonstrating issues with quoted pathnames
</content>
</entry>
<entry>
<title>Merge branch 'fg/completion-external'</title>
<updated>2018-05-23T05:38:25Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2018-05-23T05:38:25Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=fb3a0cabf23ccd1d4ae3fead2c5b478930630822'/>
<id>urn:sha1:fb3a0cabf23ccd1d4ae3fead2c5b478930630822</id>
<content type='text'>
The command line completion mechanism (in contrib/) learned to load
custom completion file for "git $command" where $command is a
custom "git-$command" that the end user has on the $PATH when using
newer version of bash.

* fg/completion-external:
  completion: load completion file for external subcommand
</content>
</entry>
<entry>
<title>Merge branch 'nd/completion-aliasfiletype-typofix'</title>
<updated>2018-05-23T05:38:24Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2018-05-23T05:38:24Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=df20b622fa36de8a65e701e094882a274b452c6a'/>
<id>urn:sha1:df20b622fa36de8a65e701e094882a274b452c6a</id>
<content type='text'>
Typofix.

* nd/completion-aliasfiletype-typofix:
  completion: fix misspelled config key aliasesfiletype
</content>
</entry>
<entry>
<title>Merge branch 'js/rebase-recreate-merge'</title>
<updated>2018-05-23T05:38:20Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2018-05-23T05:38:20Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=2c18e6ae2434a6caa5b3a7256608470948e73f66'/>
<id>urn:sha1:2c18e6ae2434a6caa5b3a7256608470948e73f66</id>
<content type='text'>
"git rebase" learned "--rebase-merges" to transplant the whole
topology of commit graph elsewhere.

* js/rebase-recreate-merge:
  rebase -i --rebase-merges: add a section to the man page
  rebase -i: introduce --rebase-merges=[no-]rebase-cousins
  pull: accept --rebase=merges to recreate the branch topology
  rebase --rebase-merges: avoid "empty merges"
  sequencer: handle post-rewrite for merge commands
  sequencer: make refs generated by the `label` command worktree-local
  rebase --rebase-merges: add test for --keep-empty
  rebase: introduce the --rebase-merges option
  rebase-helper --make-script: introduce a flag to rebase merges
  sequencer: fast-forward `merge` commands, if possible
  sequencer: introduce the `merge` command
  sequencer: introduce new commands to reset the revision
  git-rebase--interactive: clarify arguments
  sequencer: offer helpful advice when a command was rescheduled
  sequencer: refactor how original todo list lines are accessed
  sequencer: make rearrange_squash() a bit more obvious
  sequencer: avoid using errno clobbered by rollback_lock_file()
</content>
</entry>
<entry>
<title>completion: allow to customize the completable command list</title>
<updated>2018-05-21T04:23:14Z</updated>
<author>
<name>Nguyễn Thái Ngọc Duy</name>
<email>pclouds@gmail.com</email>
</author>
<published>2018-05-20T18:40:09Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=6532f3740b1c228c0a2a03a4126f4f7e4f2d73e7'/>
<id>urn:sha1:6532f3740b1c228c0a2a03a4126f4f7e4f2d73e7</id>
<content type='text'>
By default we show porcelain, external commands and a couple others
that are also popular. If you are not happy with this list, you can
now customize it a new config variable.

Signed-off-by: Nguyễn Thái Ngọc Duy &lt;pclouds@gmail.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>completion: add and use --list-cmds=alias</title>
<updated>2018-05-21T04:23:14Z</updated>
<author>
<name>Nguyễn Thái Ngọc Duy</name>
<email>pclouds@gmail.com</email>
</author>
<published>2018-05-20T18:40:08Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=3301d36b29467a05107340e4d9688ebf74335021'/>
<id>urn:sha1:3301d36b29467a05107340e4d9688ebf74335021</id>
<content type='text'>
By providing aliases via --list-cmds=, we could simplify command
collection code in the script. We only issue one git command. Before
this patch that is "git config", after it's "git --list-cmds=". In
"git help" completion case we actually reduce one "git" process (for
getting guides) but that call was added in this series so it does not
really count.

A couple of bash functions are removed because they are not needed
anymore. __git_compute_all_commands() and $__git_all_commands stay
because they are still needed for completing pager.* config and
without "alias" group, the result is still cacheable.

There is a slight (good) change in _git_help() with this patch: before
"git help &lt;tab&gt;" shows external commands (as in _not_ part of git) as
well as part of $__git_all_commands. We have finer control over
command listing now and can exclude that because we can't provide a
man page for external commands anyway.

Signed-off-by: Nguyễn Thái Ngọc Duy &lt;pclouds@gmail.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>completion: add and use --list-cmds=nohelpers</title>
<updated>2018-05-21T04:23:14Z</updated>
<author>
<name>Nguyễn Thái Ngọc Duy</name>
<email>pclouds@gmail.com</email>
</author>
<published>2018-05-20T18:40:07Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=e11dca10cfb3ef1e561c3e789b346a9719f0344a'/>
<id>urn:sha1:e11dca10cfb3ef1e561c3e789b346a9719f0344a</id>
<content type='text'>
Signed-off-by: Nguyễn Thái Ngọc Duy &lt;pclouds@gmail.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
</feed>
