<feed xmlns='http://www.w3.org/2005/Atom'>
<title>git/contrib/completion, branch v2.42.2</title>
<subtitle>Mirror of https://git.kernel.org/pub/scm/git/git.git/
</subtitle>
<id>https://git.shady.money/git/atom?h=v2.42.2</id>
<link rel='self' href='https://git.shady.money/git/atom?h=v2.42.2'/>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/'/>
<updated>2023-11-02T07:53:19Z</updated>
<entry>
<title>Merge branch 'pb/completion-aliases-doc' into maint-2.42</title>
<updated>2023-11-02T07:53:19Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2023-11-02T07:53:19Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=83442ded89b726f4156c8e702308dd84d7e43bf2'/>
<id>urn:sha1:83442ded89b726f4156c8e702308dd84d7e43bf2</id>
<content type='text'>
Clarify how "alias.foo = : git cmd ; aliased-command-string" should
be spelled with necessary whitespaces around punctuation marks to
work.

* pb/completion-aliases-doc:
  completion: improve doc for complex aliases
</content>
</entry>
<entry>
<title>Merge branch 'js/complete-checkout-t' into maint-2.42</title>
<updated>2023-11-02T07:53:18Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2023-11-02T07:53:18Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=d12df942ba017c1301a51083b82431e9b3699a11'/>
<id>urn:sha1:d12df942ba017c1301a51083b82431e9b3699a11</id>
<content type='text'>
The completion script (in contrib/) has been taught to treat the
"-t" option to "git checkout" and "git switch" just like the
"--track" option, to complete remote-tracking branches.

* js/complete-checkout-t:
  completion(switch/checkout): treat --track and -t the same
</content>
</entry>
<entry>
<title>completion: improve doc for complex aliases</title>
<updated>2023-09-13T00:46:01Z</updated>
<author>
<name>Philippe Blain</name>
<email>levraiphilippeblain@gmail.com</email>
</author>
<published>2023-09-12T17:02:15Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=4333267995662ccc9f4db3b628eebb78599e0025'/>
<id>urn:sha1:4333267995662ccc9f4db3b628eebb78599e0025</id>
<content type='text'>
The completion code can be told to use a particular completion for
aliases that shell out by using ': git &lt;cmd&gt; ;' as the first command of
the alias. This only works if &lt;cmd&gt; and the semicolon are separated by a
space, since if the space is missing __git_aliased_command returns (for
example) 'checkout;' instead of just 'checkout', and then
__git_complete_command fails to find a completion for 'checkout;'.

The examples have that space but it's not clear if it's just for
style or if it's mandatory. Explicitly mention it.

Signed-off-by: Philippe Blain &lt;levraiphilippeblain@gmail.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>completion(switch/checkout): treat --track and -t the same</title>
<updated>2023-09-08T16:26:15Z</updated>
<author>
<name>Johannes Schindelin</name>
<email>johannes.schindelin@gmx.de</email>
</author>
<published>2023-09-08T12:28:43Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=9f892830d6965d68bfa937cebcfbed9c9e552700'/>
<id>urn:sha1:9f892830d6965d68bfa937cebcfbed9c9e552700</id>
<content type='text'>
When `git switch --track ` is to be completed, only remote refs are
eligible because that is what the `--track` option targets.

And when the short-hand `-t` is used instead, the same _should_ happen.
Let's make it so.

Note that the bug exists both in the completions of `switch` and
`completion`, even if it manifests in slightly different ways: While
the completion of `git switch -t ` will not even look at remote refs,
the completion of `git checkout -t ` will look at both remote _and_
local refs. Both should look only at remote refs.

Signed-off-by: Johannes Schindelin &lt;johannes.schindelin@gmx.de&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>Merge branch 'pb/complete-diff-options'</title>
<updated>2023-07-06T18:54:46Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2023-07-06T18:54:46Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=f4c18e58be60d3f7cfec5da23f8d89526abce75a'/>
<id>urn:sha1:f4c18e58be60d3f7cfec5da23f8d89526abce75a</id>
<content type='text'>
Completion updates.

* pb/complete-diff-options: (24 commits)
  diff.c: mention completion above add_diff_options
  completion: complete --remerge-diff
  completion: complete --diff-merges, its options and --no-diff-merges
  completion: move --pickaxe-{all,regex} to __git_diff_common_options
  completion: complete --ws-error-highlight
  completion: complete --unified
  completion: complete --output-indicator-{context,new,old}
  completion: complete --output
  completion: complete --no-stat
  completion: complete --no-relative
  completion: complete --line-prefix
  completion: complete --ita-invisible-in-index and --ita-visible-in-index
  completion: complete --irreversible-delete
  completion: complete --ignore-matching-lines
  completion: complete --function-context
  completion: complete --find-renames
  completion: complete --find-object
  completion: complete --find-copies
  completion: complete --default-prefix
  completion: complete --compact-summary
  ...
</content>
</entry>
<entry>
<title>completion: complete --remerge-diff</title>
<updated>2023-06-26T16:40:14Z</updated>
<author>
<name>Philippe Blain</name>
<email>levraiphilippeblain@gmail.com</email>
</author>
<published>2023-06-26T16:24:47Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=55245d669a6c427efd9f7c1782105bea4e97a431'/>
<id>urn:sha1:55245d669a6c427efd9f7c1782105bea4e97a431</id>
<content type='text'>
--remerge-diff only makes sense for 'git log' and 'git show', so add it
to __git_log_show_options which is referenced in the completion for
these two commands.

Signed-off-by: Philippe Blain &lt;levraiphilippeblain@gmail.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>completion: complete --diff-merges, its options and --no-diff-merges</title>
<updated>2023-06-26T16:40:14Z</updated>
<author>
<name>Philippe Blain</name>
<email>levraiphilippeblain@gmail.com</email>
</author>
<published>2023-06-26T16:24:46Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=98aaeb2f775949faac4840ba90b10d8cc328a71b'/>
<id>urn:sha1:98aaeb2f775949faac4840ba90b10d8cc328a71b</id>
<content type='text'>
The flags --[no-]diff-merges only make sense for 'git log' and 'git
show', so add a new variable __git_log_show_options for options only
relevant to these two commands, and add them there. Also add
__git_diff_merges_opts and list the accepted values for --diff-merges,
and use it in _git_log and _git_show.

Signed-off-by: Philippe Blain &lt;levraiphilippeblain@gmail.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>completion: move --pickaxe-{all,regex} to __git_diff_common_options</title>
<updated>2023-06-26T16:40:13Z</updated>
<author>
<name>Philippe Blain</name>
<email>levraiphilippeblain@gmail.com</email>
</author>
<published>2023-06-26T16:24:45Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=d520d98382d3ad7071bc33e2ea2204a4c64ba7bb'/>
<id>urn:sha1:d520d98382d3ad7071bc33e2ea2204a4c64ba7bb</id>
<content type='text'>
The options --pickaxe-all and --pickaxe-regex are listed in
__git_diff_difftool_options and repeated in _git_log. Move them to
__git_diff_common_options instead, which makes them available
automatically in the completion of other commands referencing this
variable.

Signed-off-by: Philippe Blain &lt;levraiphilippeblain@gmail.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>completion: complete --ws-error-highlight</title>
<updated>2023-06-26T16:40:13Z</updated>
<author>
<name>Philippe Blain</name>
<email>levraiphilippeblain@gmail.com</email>
</author>
<published>2023-06-26T16:24:44Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=da260f61889f0cda3267ca09db3fe48794f52a26'/>
<id>urn:sha1:da260f61889f0cda3267ca09db3fe48794f52a26</id>
<content type='text'>
Add --ws-error-highlight= to the list in __git_diff_common_options, and
add the accepted values in a new list __git_ws_error_highlight_opts.

Use __git_ws_error_highlight_opts in _git_diff, _git_log and _git_show
to offer the accepted values.

As noted in fd0bc17557 (completion: add diff --color-moved[-ws],
2020-02-21), there is no easy way to offer completion for several
comma-separated values, so this is limited to completing a single
value.

Signed-off-by: Philippe Blain &lt;levraiphilippeblain@gmail.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>completion: complete --unified</title>
<updated>2023-06-26T16:40:13Z</updated>
<author>
<name>Philippe Blain</name>
<email>levraiphilippeblain@gmail.com</email>
</author>
<published>2023-06-26T16:24:43Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=3b698111d5324236c7af330b0c02698f30d15d19'/>
<id>urn:sha1:3b698111d5324236c7af330b0c02698f30d15d19</id>
<content type='text'>
Signed-off-by: Philippe Blain &lt;levraiphilippeblain@gmail.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
</feed>
