<feed xmlns='http://www.w3.org/2005/Atom'>
<title>git/contrib/completion, branch v2.17.2</title>
<subtitle>Mirror of https://git.kernel.org/pub/scm/git/git.git/
</subtitle>
<id>https://git.shady.money/git/atom?h=v2.17.2</id>
<link rel='self' href='https://git.shady.money/git/atom?h=v2.17.2'/>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/'/>
<updated>2018-03-28T18:04:24Z</updated>
<entry>
<title>Merge branch 'nd/parseopt-completion'</title>
<updated>2018-03-28T18:04:24Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2018-03-28T18:04:24Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=87cc76fa3a79eb86136e55432bd4e4ecc84744cd'/>
<id>urn:sha1:87cc76fa3a79eb86136e55432bd4e4ecc84744cd</id>
<content type='text'>
Hotfix for recently graduated topic that give help to completion
scripts from the Git subcommands that are being completed

* nd/parseopt-completion:
  t9902: disable test on the list of merge-strategies under GETTEXT_POISON
  completion: clear cached --options when sourcing the completion script
</content>
</entry>
<entry>
<title>completion: clear cached --options when sourcing the completion script</title>
<updated>2018-03-22T17:22:09Z</updated>
<author>
<name>SZEDER Gábor</name>
<email>szeder.dev@gmail.com</email>
</author>
<published>2018-03-22T14:16:04Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=8b0eaa41f2371cafd28324b00128405a80740b16'/>
<id>urn:sha1:8b0eaa41f2371cafd28324b00128405a80740b16</id>
<content type='text'>
The established way to update the completion script in an already
running shell is to simply source it again: this brings in any new
--options and features, and clears caching variables.  E.g. it clears
the variables caching the list of (all|porcelain) git commands, so
when they are later lazy-initialized again, then they will list and
cache any newly installed commmands as well.

Unfortunately, since d401f3debc (git-completion.bash: introduce
__gitcomp_builtin, 2018-02-09) and subsequent patches this doesn't
work for a lot of git commands' options.  To eliminate a lot of
hard-to-maintain hard-coded lists of options, those commits changed
the completion script to use a bunch of programmatically created and
lazy-initialized variables to cache the options of those builtin
porcelain commands that use parse-options.  These variables are not
cleared upon sourcing the completion script, therefore they continue
caching the old lists of options, even when some commands recently
learned new options or when deprecated options were removed.

Always 'unset' these variables caching the options of builtin commands
when sourcing the completion script.

Redirect 'unset's stderr to /dev/null, because ZSH's 'unset' complains
if it's invoked without any arguments, i.e. no variables caching
builtin's options are set.  This can happen, if someone were to source
the completion script twice without completing any --options in
between.  Bash stays silent in this case.

Add tests to ensure that these variables are indeed cleared when the
completion script is sourced; not just the variables caching options,
but all other caching variables, i.e. the variables caching commands,
porcelain commands and merge strategies as well.

Signed-off-by: SZEDER Gábor &lt;szeder.dev@gmail.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>Merge branch 'tz/complete-tag-delete-tagname'</title>
<updated>2018-03-21T18:30:15Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2018-03-21T18:30:15Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=c108a77f8f9de5b42c9661b9d4584f54f57766ec'/>
<id>urn:sha1:c108a77f8f9de5b42c9661b9d4584f54f57766ec</id>
<content type='text'>
* tz/complete-tag-delete-tagname:
  completion: complete tags with git tag --delete/--verify
</content>
</entry>
<entry>
<title>completion: complete tags with git tag --delete/--verify</title>
<updated>2018-03-19T16:55:01Z</updated>
<author>
<name>Todd Zullinger</name>
<email>tmz@pobox.com</email>
</author>
<published>2018-03-18T04:01:35Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=1775e990f793965dcfc2cf62f4efccf0f2c21e28'/>
<id>urn:sha1:1775e990f793965dcfc2cf62f4efccf0f2c21e28</id>
<content type='text'>
Completion of tag names has worked for the short -d/-v options since
88e21dc746 ("Teach bash about completing arguments for git-tag",
2007-08-31).  The long options were not added to "git tag" until many
years later, in c97eff5a95 ("git-tag: introduce long forms for the
options", 2011-08-28).

Extend tag name completion to --delete/--verify.

Signed-off-by: Todd Zullinger &lt;tmz@pobox.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>Merge branch 'cl/send-email-reply-to'</title>
<updated>2018-03-15T22:00:45Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2018-03-15T22:00:45Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=e74737b6a1d403bd0ad856bd23143ba0bd5dfabb'/>
<id>urn:sha1:e74737b6a1d403bd0ad856bd23143ba0bd5dfabb</id>
<content type='text'>
"git send-email" learned "--reply-to=&lt;address&gt;" option.

* cl/send-email-reply-to:
  send-email: support separate Reply-To address
  send-email: rename variable for clarity
</content>
</entry>
<entry>
<title>Merge branch 'nd/parseopt-completion'</title>
<updated>2018-03-14T19:01:07Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2018-03-14T19:01:06Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=7fb6aefd2aaffe66e614f7f7b83e5b7ab16d4806'/>
<id>urn:sha1:7fb6aefd2aaffe66e614f7f7b83e5b7ab16d4806</id>
<content type='text'>
Teach parse-options API an option to help the completion script,
and make use of the mechanism in command line completion.

* nd/parseopt-completion: (45 commits)
  completion: more subcommands in _git_notes()
  completion: complete --{reuse,reedit}-message= for all notes subcmds
  completion: simplify _git_notes
  completion: don't set PARSE_OPT_NOCOMPLETE on --rerere-autoupdate
  completion: use __gitcomp_builtin in _git_worktree
  completion: use __gitcomp_builtin in _git_tag
  completion: use __gitcomp_builtin in _git_status
  completion: use __gitcomp_builtin in _git_show_branch
  completion: use __gitcomp_builtin in _git_rm
  completion: use __gitcomp_builtin in _git_revert
  completion: use __gitcomp_builtin in _git_reset
  completion: use __gitcomp_builtin in _git_replace
  remote: force completing --mirror= instead of --mirror
  completion: use __gitcomp_builtin in _git_remote
  completion: use __gitcomp_builtin in _git_push
  completion: use __gitcomp_builtin in _git_pull
  completion: use __gitcomp_builtin in _git_notes
  completion: use __gitcomp_builtin in _git_name_rev
  completion: use __gitcomp_builtin in _git_mv
  completion: use __gitcomp_builtin in _git_merge_base
  ...
</content>
</entry>
<entry>
<title>Merge branch 'nd/worktree-move'</title>
<updated>2018-03-14T19:01:05Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2018-03-14T19:01:05Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=bd0f794342d5b3921f2d5d4bffce87ec7b7e4d96'/>
<id>urn:sha1:bd0f794342d5b3921f2d5d4bffce87ec7b7e4d96</id>
<content type='text'>
"git worktree" learned move and remove subcommands.

* nd/worktree-move:
  t2028: fix minor error and issues in newly-added "worktree move" tests
  worktree remove: allow it when $GIT_WORK_TREE is already gone
  worktree remove: new command
  worktree move: refuse to move worktrees with submodules
  worktree move: accept destination as directory
  worktree move: new command
  worktree.c: add update_worktree_location()
  worktree.c: add validate_worktree()
</content>
</entry>
<entry>
<title>completion: more subcommands in _git_notes()</title>
<updated>2018-03-07T19:02:48Z</updated>
<author>
<name>Nguyễn Thái Ngọc Duy</name>
<email>pclouds@gmail.com</email>
</author>
<published>2018-03-07T01:05:04Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=27b42d045c06b6138555fef2b00d8d72220bc8be'/>
<id>urn:sha1:27b42d045c06b6138555fef2b00d8d72220bc8be</id>
<content type='text'>
Two subcommands are added for completion: merge and get-ref. get-ref
is more like plumbing. But since it does not share the prefix with any
other subcommands, it won't slow anybody down.

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: complete --{reuse,reedit}-message= for all notes subcmds</title>
<updated>2018-03-07T19:02:48Z</updated>
<author>
<name>Nguyễn Thái Ngọc Duy</name>
<email>pclouds@gmail.com</email>
</author>
<published>2018-03-07T01:05:03Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=b25e2e64f68f3b1e790da9028c42b305c71580c7'/>
<id>urn:sha1:b25e2e64f68f3b1e790da9028c42b305c71580c7</id>
<content type='text'>
The new subcommand that takes these options is 'git notes edit'. Just
accept the options from subcommands since we handle them the same way
in builtin/notes.c anyway. If a user does

    git prune --reuse-message=...

just let the command catches that error when it's executed.

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: simplify _git_notes</title>
<updated>2018-03-07T19:02:48Z</updated>
<author>
<name>Nguyễn Thái Ngọc Duy</name>
<email>pclouds@gmail.com</email>
</author>
<published>2018-03-07T01:05:02Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=4ea2c974a0ffef18b966be1bb03168c7f10799c1'/>
<id>urn:sha1:4ea2c974a0ffef18b966be1bb03168c7f10799c1</id>
<content type='text'>
This also adds completion for 'git notes remove' and 'git notes edit'.

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>
