<feed xmlns='http://www.w3.org/2005/Atom'>
<title>git/contrib/completion/git-completion.bash, branch v2.23.2</title>
<subtitle>Mirror of https://git.kernel.org/pub/scm/git/git.git/
</subtitle>
<id>https://git.shady.money/git/atom?h=v2.23.2</id>
<link rel='self' href='https://git.shady.money/git/atom?h=v2.23.2'/>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/'/>
<updated>2019-07-09T22:25:44Z</updated>
<entry>
<title>Merge branch 'nd/switch-and-restore'</title>
<updated>2019-07-09T22:25:44Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2019-07-09T22:25:44Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=f496b064fc1135e0dded7f93d85d72eb0b302c22'/>
<id>urn:sha1:f496b064fc1135e0dded7f93d85d72eb0b302c22</id>
<content type='text'>
Two new commands "git switch" and "git restore" are introduced to
split "checking out a branch to work on advancing its history" and
"checking out paths out of the index and/or a tree-ish to work on
advancing the current history" out of the single "git checkout"
command.

* nd/switch-and-restore: (46 commits)
  completion: disable dwim on "git switch -d"
  switch: allow to switch in the middle of bisect
  t2027: use test_must_be_empty
  Declare both git-switch and git-restore experimental
  help: move git-diff and git-reset to different groups
  doc: promote "git restore"
  user-manual.txt: prefer 'merge --abort' over 'reset --hard'
  completion: support restore
  t: add tests for restore
  restore: support --patch
  restore: replace --force with --ignore-unmerged
  restore: default to --source=HEAD when only --staged is specified
  restore: reject invalid combinations with --staged
  restore: add --worktree and --staged
  checkout: factor out worktree checkout code
  restore: disable overlay mode by default
  restore: make pathspec mandatory
  restore: take tree-ish from --source option instead
  checkout: split part of it to new command 'restore'
  doc: promote "git switch"
  ...
</content>
</entry>
<entry>
<title>Merge branch 'nd/completion-no-cache-failure'</title>
<updated>2019-07-09T22:25:36Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2019-07-09T22:25:35Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=0cc593998629829402d6b52e13fb424b8614985a'/>
<id>urn:sha1:0cc593998629829402d6b52e13fb424b8614985a</id>
<content type='text'>
An incorrect list of options was cached after command line
completion failed (e.g. trying to complete a command that requires
a repository outside one), which has been corrected.

* nd/completion-no-cache-failure:
  completion: do not cache if --git-completion-helper fails
</content>
</entry>
<entry>
<title>completion: disable dwim on "git switch -d"</title>
<updated>2019-06-20T20:31:51Z</updated>
<author>
<name>Nguyễn Thái Ngọc Duy</name>
<email>pclouds@gmail.com</email>
</author>
<published>2019-06-20T09:55:22Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=97ed685701a6df0273f7d29fd5bc0a0658a63cad'/>
<id>urn:sha1:97ed685701a6df0273f7d29fd5bc0a0658a63cad</id>
<content type='text'>
Even though dwim is enabled by default, it will never be done when
--detached is specified. If you force "-d --guess" you will get an error
because --guess then implies -c which cannot be used with -d. So we can
disable dwim in "switch -d". It makes the completion list in this case a
bit shorter.

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: do not cache if --git-completion-helper fails</title>
<updated>2019-06-12T17:36:46Z</updated>
<author>
<name>Nguyễn Thái Ngọc Duy</name>
<email>pclouds@gmail.com</email>
</author>
<published>2019-06-12T08:56:06Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=69702523afb4de692b415648e53fcfb1b4630f18'/>
<id>urn:sha1:69702523afb4de692b415648e53fcfb1b4630f18</id>
<content type='text'>
"git &lt;cmd&gt; --git-completion-helper" could fail if the command checks for
a repo before parse_options(). If the result is cached, later on when
the user moves to a worktree with repo, tab completion will still fail.

Avoid this by detecting errors and not cache the completion output. We
can try again and hopefully succeed next time (e.g. when a repo is
found).

Of course if --git-completion-helper fails permanently because of other
reasons (*), this will slow down completion. But I don't see any better
option to handle that case.

(*) one of those cases is if __gitcomp_builtin is called on a command
  that does not support --git-completion-helper. And we do have a
  generic call

    __git_complete_common "$command"

  but this case is protected with __git_support_parseopt_helper so we're
  good.

Reported-by: Felipe Contreras &lt;felipe.contreras@gmail.com&gt;
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>list-objects-filter: disable 'sparse:path' filters</title>
<updated>2019-05-29T18:05:34Z</updated>
<author>
<name>Christian Couder</name>
<email>christian.couder@gmail.com</email>
</author>
<published>2019-05-29T12:44:32Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=e693237e2ba27b6129e8af7f6a794f5c2fbd26f3'/>
<id>urn:sha1:e693237e2ba27b6129e8af7f6a794f5c2fbd26f3</id>
<content type='text'>
If someone wants to use as a filter a sparse file that is in the
repository, something like "--filter=sparse:oid=&lt;ref&gt;:&lt;path&gt;"
already works.

So 'sparse:path' is only interesting if the sparse file is not in
the repository. In this case though the current implementation has
a big security issue, as it makes it possible to ask the server to
read any file, like for example /etc/password, and to explore the
filesystem, as well as individual lines of files.

If someone is interested in using a sparse file that is not in the
repository as a filter, then at the minimum a config option, such
as "uploadpack.sparsePathFilter", should be implemented first to
restrict the directory from which the files specified by
'sparse:path' can be read.

For now though, let's just disable 'sparse:path' filters.

Helped-by: Matthew DeVore &lt;matvore@google.com&gt;
Helped-by: Jeff Hostetler &lt;git@jeffhostetler.com&gt;
Signed-off-by: Christian Couder &lt;chriscool@tuxfamily.org&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>completion: support restore</title>
<updated>2019-05-07T04:04:48Z</updated>
<author>
<name>Nguyễn Thái Ngọc Duy</name>
<email>pclouds@gmail.com</email>
</author>
<published>2019-04-25T09:45:56Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=75f4c7c1eb06cdf6eae1339bbac02dfb620acc11'/>
<id>urn:sha1:75f4c7c1eb06cdf6eae1339bbac02dfb620acc11</id>
<content type='text'>
Completion for restore is straightforward. We could still do better
though by giving the list of just tracked files instead of all present
ones. But let's leave it for later.

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>Merge branch 'dl/submodule-set-branch'</title>
<updated>2019-04-25T07:41:18Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2019-04-25T07:41:18Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=01f8d78887d45dc10f29d3926d5cc52f78838846'/>
<id>urn:sha1:01f8d78887d45dc10f29d3926d5cc52f78838846</id>
<content type='text'>
"git submodule" learns "set-branch" subcommand that allows the
submodule.*.branch settings to be modified.

* dl/submodule-set-branch:
  submodule: teach set-branch subcommand
  submodule--helper: teach config subcommand --unset
  git-submodule.txt: "--branch &lt;branch&gt;" option defaults to 'master'
</content>
</entry>
<entry>
<title>Merge branch 'da/smerge'</title>
<updated>2019-04-22T02:14:48Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2019-04-22T02:14:48Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=5116eab70bf8a0c8b1c29a09c4b932c4d1cf2701'/>
<id>urn:sha1:5116eab70bf8a0c8b1c29a09c4b932c4d1cf2701</id>
<content type='text'>
"git mergetool" learned to offer Sublime Merge (smerge) as one of
its backends.

* da/smerge:
  contrib/completion: add smerge to the mergetool completion candidates
  mergetools: add support for smerge (Sublime Merge)
</content>
</entry>
<entry>
<title>submodule: teach set-branch subcommand</title>
<updated>2019-04-10T03:07:16Z</updated>
<author>
<name>Denton Liu</name>
<email>liu.denton@gmail.com</email>
</author>
<published>2019-02-08T11:21:34Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=b57e8119e6e08f731308923ef2b033eb45152bc6'/>
<id>urn:sha1:b57e8119e6e08f731308923ef2b033eb45152bc6</id>
<content type='text'>
This teaches git-submodule the set-branch subcommand which allows the
branch of a submodule to be set through a porcelain command without
having to manually manipulate the .gitmodules file.

Signed-off-by: Denton Liu &lt;liu.denton@gmail.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>contrib/completion: add smerge to the mergetool completion candidates</title>
<updated>2019-04-04T09:21:26Z</updated>
<author>
<name>David Aguilar</name>
<email>davvid@gmail.com</email>
</author>
<published>2019-04-04T07:34:39Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=f57b2ae348950c0048f0091093f9d1e095d11d08'/>
<id>urn:sha1:f57b2ae348950c0048f0091093f9d1e095d11d08</id>
<content type='text'>
Signed-off-by: David Aguilar &lt;davvid@gmail.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
</feed>
