<feed xmlns='http://www.w3.org/2005/Atom'>
<title>git/contrib/completion/git-completion.bash, branch v2.41.2</title>
<subtitle>Mirror of https://git.kernel.org/pub/scm/git/git.git/
</subtitle>
<id>https://git.shady.money/git/atom?h=v2.41.2</id>
<link rel='self' href='https://git.shady.money/git/atom?h=v2.41.2'/>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/'/>
<updated>2022-11-30T00:58:06Z</updated>
<entry>
<title>completion: add case-insensitive match of pseudorefs</title>
<updated>2022-11-30T00:58:06Z</updated>
<author>
<name>Alison Winters</name>
<email>alisonatwork@outlook.com</email>
</author>
<published>2022-11-21T00:26:59Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=9de31f7bd25029eb6e2292ede6df3a646f261de4'/>
<id>urn:sha1:9de31f7bd25029eb6e2292ede6df3a646f261de4</id>
<content type='text'>
When GIT_COMPLETION_IGNORE_CASE is set, also allow lowercase completion
text like "head" to match uppercase HEAD and other pseudorefs.

Signed-off-by: Alison Winters &lt;alisonatwork@outlook.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>completion: add optional ignore-case when matching refs</title>
<updated>2022-11-30T00:58:06Z</updated>
<author>
<name>Alison Winters</name>
<email>alisonatwork@outlook.com</email>
</author>
<published>2022-11-21T00:26:58Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=9bab766fb28fae57a229bd90558ec4453ca71be9'/>
<id>urn:sha1:9bab766fb28fae57a229bd90558ec4453ca71be9</id>
<content type='text'>
If GIT_COMPLETION_IGNORE_CASE is set, --ignore-case will be added to
git for-each-ref calls so that refs can be matched case insensitively,
even when running on case sensitive filesystems.

Signed-off-by: Alison Winters &lt;alisonatwork@outlook.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>completion: tab completion of filenames for 'git restore'</title>
<updated>2022-03-16T00:21:22Z</updated>
<author>
<name>David Cantrell</name>
<email>david@cantrell.org.uk</email>
</author>
<published>2022-03-15T22:13:57Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=841fd28ce215ffeea4a291e7be533545c641396a'/>
<id>urn:sha1:841fd28ce215ffeea4a291e7be533545c641396a</id>
<content type='text'>
If no --args are present after 'git restore', it assumes that you
want to tab-complete one of the files with unstaged uncommitted
changes.

If a file has been staged, we don't want to list it, as restoring those
requires a slightly more complex `git restore --staged`, so we only list
those files that are --modified. While --committable also looks like
a good candidate, that includes changes that have been staged.

Signed-off-by: David Cantrell &lt;david@cantrell.org.uk&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>Merge branch 'ab/complete-show-all-commands'</title>
<updated>2022-02-18T00:25:06Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2022-02-18T00:25:05Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=037dbe8ed79fab357b7a183d032b08b4ec22e5e8'/>
<id>urn:sha1:037dbe8ed79fab357b7a183d032b08b4ec22e5e8</id>
<content type='text'>
The command line completion script (in contrib/) learned to
complete all Git subcommands, including the ones that are normally
hidden, when GIT_COMPLETION_SHOW_ALL_COMMANDS is used.

* ab/complete-show-all-commands:
  completion: add a GIT_COMPLETION_SHOW_ALL_COMMANDS
  completion tests: re-source git-completion.bash in a subshell
</content>
</entry>
<entry>
<title>completion: handle unusual characters for sparse-checkout</title>
<updated>2022-02-08T18:15:43Z</updated>
<author>
<name>Lessley Dennington</name>
<email>lessleydennington@gmail.com</email>
</author>
<published>2022-02-07T17:31:45Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=48803821b1712687d6e06e9d7a0e911eabecf4d1'/>
<id>urn:sha1:48803821b1712687d6e06e9d7a0e911eabecf4d1</id>
<content type='text'>
Update the __gitcomp_directories method to de-quote and handle unusual
characters in directory names. Although this initially involved an attempt
to re-use the logic in __git_index_files, this method removed
subdirectories (e.g. folder1/0/ became folder1/), so instead new custom
logic was placed directly in the __gitcomp_directories method.

Note there are two tests for this new functionality - one for spaces and
accents and one for backslashes and tabs. The backslashes and tabs test
uses FUNNYNAMES to avoid running on Windows. This is because:

1. Backslashes are explicitly not allowed in Windows file paths.
2. Although tabs appear to be allowed when creating a file in a Windows
bash shell, they actually are not renderable (and appear as empty boxes
in the shell).

Co-authored-by: Johannes Schindelin &lt;johannes.schindelin@gmx.de&gt;
Co-authored-by: Lessley Dennington &lt;lessleydennington@gmail.com&gt;
Helped-by: Ævar Arnfjörð Bjarmason &lt;avarab@gmail.com&gt;
Signed-off-by: Lessley Dennington &lt;lessleydennington@gmail.com&gt;
Reviewed-by: Elijah Newren &lt;newren@gmail.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>completion: improve sparse-checkout cone mode directory completion</title>
<updated>2022-02-08T18:15:43Z</updated>
<author>
<name>Lessley Dennington</name>
<email>lessleydennington@gmail.com</email>
</author>
<published>2022-02-07T17:31:44Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=c5f5c5082f813a875c213445135a24c2507021dd'/>
<id>urn:sha1:c5f5c5082f813a875c213445135a24c2507021dd</id>
<content type='text'>
Use new __gitcomp_directories method to complete directory names in cone
mode sparse-checkouts. This method addresses the caveat of poor
performance in monorepos from the previous commit (by completing only one
level of directories).

The unusual character caveat from the previous commit will be fixed by the
final commit in this series.

Co-authored-by: Elijah Newren &lt;newren@gmail.com&gt;
Co-authored-by: Lessley Dennington &lt;lessleydennington@gmail.com&gt;
Signed-off-by: Lessley Dennington &lt;lessleydennington@gmail.com&gt;
Reviewed-by: Elijah Newren &lt;newren@gmail.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>completion: address sparse-checkout issues</title>
<updated>2022-02-08T18:15:42Z</updated>
<author>
<name>Lessley Dennington</name>
<email>lessleydennington@gmail.com</email>
</author>
<published>2022-02-07T17:31:43Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=fd6d9bec145924ba704b34f0788b239bff9d2898'/>
<id>urn:sha1:fd6d9bec145924ba704b34f0788b239bff9d2898</id>
<content type='text'>
Correct multiple issues with tab completion of the git sparse-checkout
command. These issues were:

1. git sparse-checkout &lt;TAB&gt; previously resulted in an incomplete list of
subcommands (it was missing reapply and add).
2. Subcommand options were not tab-completable.
3. git sparse-checkout set &lt;TAB&gt; and git sparse-checkout add &lt;TAB&gt; showed
both file names and directory names. While this may be a less surprising
behavior for non-cone mode, cone mode sparse checkouts should complete
only directory names.

Note that while the new strategy of just using git ls-tree to complete on
directory names is simple and a step in the right direction, it does have
some caveats. These are:

1. Likelihood of poor performance in large monorepos (as a result of
recursively completing directory names).
2. Inability to handle paths containing unusual characters.

These caveats will be fixed by subsequent commits in this series.

Signed-off-by: Lessley Dennington &lt;lessleydennington@gmail.com&gt;
Reviewed-by: Elijah Newren &lt;newren@gmail.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>completion: add a GIT_COMPLETION_SHOW_ALL_COMMANDS</title>
<updated>2022-02-02T21:09:08Z</updated>
<author>
<name>Ævar Arnfjörð Bjarmason</name>
<email>avarab@gmail.com</email>
</author>
<published>2022-02-02T11:15:10Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=d9f88dd8bbf5302256ece5e3c50a1d3d59d2cd0e'/>
<id>urn:sha1:d9f88dd8bbf5302256ece5e3c50a1d3d59d2cd0e</id>
<content type='text'>
Add a GIT_COMPLETION_SHOW_ALL_COMMANDS=1 configuration setting to go
with the existing GIT_COMPLETION_SHOW_ALL=1 added in
c099f579b98 (completion: add GIT_COMPLETION_SHOW_ALL env var,
2020-08-19).

This will include plumbing commands such as "cat-file" in "git &lt;TAB&gt;"
and "git c&lt;TAB&gt;" completion. Without/with this I have 134 and 243
completion with git &lt;TAB&gt;, respectively.

It was already possible to do this by tweaking
GIT_TESTING_PORCELAIN_COMMAND_LIST= from the outside, that testing
variable was added in 84a97131065 (completion: let git provide the
completable command list, 2018-05-20). Doing this before loading
git-completion.bash worked:

    export GIT_TESTING_PORCELAIN_COMMAND_LIST="$(git --list-cmds=builtins,main,list-mainporcelain,others,nohelpers,alias,list-complete,config)"

But such testing variables are not meant to be used from the outside,
and we make no guarantees that those internal won't change. So let's
expose this as a dedicated configuration knob.

It would be better to teach --list-cmds=* a new category which would
include all of these groups, but that's a larger change that we can
leave for some other time.

1. https://lore.kernel.org/git/CAGP6POJ9gwp+t-eP3TPkivBLLbNb2+qj=61Mehcj=1BgrVOSLA@mail.gmail.com/

Reported-by: Hongyi Zhao &lt;hongyi.zhao@gmail.com&gt;
Signed-off-by: Ævar Arnfjörð Bjarmason &lt;avarab@gmail.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>Merge branch 'en/zdiff3'</title>
<updated>2021-12-15T17:39:47Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2021-12-15T17:39:47Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=4ce498baa3976cf96d3feb4215a486dd47ec2e7b'/>
<id>urn:sha1:4ce498baa3976cf96d3feb4215a486dd47ec2e7b</id>
<content type='text'>
"Zealous diff3" style of merge conflict presentation has been added.

* en/zdiff3:
  update documentation for new zdiff3 conflictStyle
  xdiff: implement a zealous diff3, or "zdiff3"
</content>
</entry>
<entry>
<title>Merge branch 'yn/complete-date-format-options'</title>
<updated>2021-12-10T22:35:15Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2021-12-10T22:35:15Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=4b1197ab5a74982fd09bda07d17325f1261975ee'/>
<id>urn:sha1:4b1197ab5a74982fd09bda07d17325f1261975ee</id>
<content type='text'>
The completion script (in contrib/) learns that the "--date"
option of commands from the "git log" family takes "human" and
"auto" as valid values.

* yn/complete-date-format-options:
  completion: add human and auto: date format
</content>
</entry>
</feed>
