<feed xmlns='http://www.w3.org/2005/Atom'>
<title>git/contrib/completion/git-completion.bash, branch v2.30.2</title>
<subtitle>Mirror of https://git.kernel.org/pub/scm/git/git.git/
</subtitle>
<id>https://git.shady.money/git/atom?h=v2.30.2</id>
<link rel='self' href='https://git.shady.money/git/atom?h=v2.30.2'/>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/'/>
<updated>2020-12-08T23:11:22Z</updated>
<entry>
<title>Merge branch 'fc/zsh-completion'</title>
<updated>2020-12-08T23:11:22Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2020-12-08T23:11:22Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=7d92da37871dceb732a56f5a3aecf0be872a40ab'/>
<id>urn:sha1:7d92da37871dceb732a56f5a3aecf0be872a40ab</id>
<content type='text'>
Hotfix for a recent breakage.

* fc/zsh-completion:
  completion: bash: fix gitk alias regression
  completion: zsh: fix file completion regression
</content>
</entry>
<entry>
<title>completion: bash: fix gitk alias regression</title>
<updated>2020-12-07T21:39:53Z</updated>
<author>
<name>Felipe Contreras</name>
<email>felipe.contreras@gmail.com</email>
</author>
<published>2020-12-05T07:10:23Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=076496457e1abe3058d48cb5c387d1face704494'/>
<id>urn:sha1:076496457e1abe3058d48cb5c387d1face704494</id>
<content type='text'>
Long time ago when the _git_complete helper was introduced, _gitk was
replaced with __gitk_main, and a placeholder for backwards compatibility
pointing to __git_wrap_main_gitk was left in place.

When "__git_complete gitk __gitk_main" was called, that created the
__git_wrap__gitk_main helper, which is just basically "__git_func_wrap
__gitk_main" plus `complete` options.

Unfortunately the commit b0a4b2d257 (completion: add support for
backwards compatibility, 2012-05-19) missed a previous instance of a
call to _gitk in _git_gitk

So, basically we had __git_wrap__git_main -&gt; __git_func_wrap __git_main -&gt;
__git_complete_command gitk -&gt; _git_gitk -&gt; _gitk -&gt;
__git_wrap__gitk_main -&gt; __git_func_wrap __gitk_main -&gt; __gitk_main.

There was never any need to call __git_func_wrap twice. Since _git_gitk
is always called inside the wrapper, it can call __gitk_main directly.

And then, in commit 441ecdab37 (completion: bash: remove old compat
wrappers, 2020-10-27) _gitk was removed, which triggers the following
error:

  _git_gitk:9: command not found: _gitk

Let's call the correct function: __gitk_main.

Cc: SZEDER Gábor &lt;szeder.dev@gmail.com&gt;
Signed-off-by: Felipe Contreras &lt;felipe.contreras@gmail.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>completion: bash: improve alias loop detection</title>
<updated>2020-11-17T18:57:46Z</updated>
<author>
<name>Felipe Contreras</name>
<email>felipe.contreras@gmail.com</email>
</author>
<published>2020-11-12T22:34:52Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=e4c75edb52acab8c90520ceedab4326b972cc0af'/>
<id>urn:sha1:e4c75edb52acab8c90520ceedab4326b972cc0af</id>
<content type='text'>
It is possible for the name of an alias to end with the name of another
alias, in which case the code will incorrectly detect a loop.

We can fix that by adding an extra space between words.

Suggested-by: SZEDER Gábor &lt;szeder.dev@gmail.com&gt;
Signed-off-by: Felipe Contreras &lt;felipe.contreras@gmail.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>completion: bash: check for alias loop</title>
<updated>2020-11-10T02:09:21Z</updated>
<author>
<name>Felipe Contreras</name>
<email>felipe.contreras@gmail.com</email>
</author>
<published>2020-11-10T02:03:43Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=c2822a842dc993722a9d6f8226189312b95d8801'/>
<id>urn:sha1:c2822a842dc993722a9d6f8226189312b95d8801</id>
<content type='text'>
We don't want to be stuck in an endless cycle.

Signed-off-by: Felipe Contreras &lt;felipe.contreras@gmail.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>completion: bash: support recursive aliases</title>
<updated>2020-11-10T02:09:21Z</updated>
<author>
<name>Felipe Contreras</name>
<email>felipe.contreras@gmail.com</email>
</author>
<published>2020-11-10T02:03:42Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=9414938c348f47c76dcea7826ea0b22adb585300'/>
<id>urn:sha1:9414938c348f47c76dcea7826ea0b22adb585300</id>
<content type='text'>
It is possible to have recursive aliases like:

  l = log --oneline
  lg = l --graph

So the completion should detect such aliases as well.

Signed-off-by: Felipe Contreras &lt;felipe.contreras@gmail.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>Merge branch 'fc/zsh-completion'</title>
<updated>2020-11-09T22:06:29Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2020-11-09T22:06:29Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=4560eae44f43d6cda027550dbc814bb4b1a9f638'/>
<id>urn:sha1:4560eae44f43d6cda027550dbc814bb4b1a9f638</id>
<content type='text'>
Zsh autocompletion (in contrib/) update.

* fc/zsh-completion: (29 commits)
  zsh: update copyright notices
  completion: bash: remove old compat wrappers
  completion: bash: cleanup cygwin check
  completion: bash: trivial cleanup
  completion: zsh: add simple version check
  completion: zsh: trivial simplification
  completion: zsh: add alias descriptions
  completion: zsh: improve command tags
  completion: zsh: refactor command completion
  completion: zsh: shuffle functions around
  completion: zsh: simplify file_direct
  completion: zsh: simplify nl_append
  completion: zsh: trivial cleanup
  completion: zsh: simplify direct compadd
  completion: zsh: simplify compadd functions
  completion: zsh: fix splitting of words
  completion: zsh: add missing direct_append
  completion: fix conflict with bashcomp
  completion: zsh: fix completion for --no-.. options
  completion: bash: remove zsh wrapper
  ...
</content>
</entry>
<entry>
<title>Merge branch 'dl/diff-merge-base'</title>
<updated>2020-11-02T21:17:39Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2020-11-02T21:17:39Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=b6fb70c985a6fc113e971a6696f328abf8315dce'/>
<id>urn:sha1:b6fb70c985a6fc113e971a6696f328abf8315dce</id>
<content type='text'>
"git diff A...B" learned "git diff --merge-base A B", which is a
longer short-hand to say the same thing.

* dl/diff-merge-base:
  contrib/completion: complete `git diff --merge-base`
  builtin/diff-tree: learn --merge-base
  builtin/diff-index: learn --merge-base
  t4068: add --merge-base tests
  diff-lib: define diff_get_merge_base()
  diff-lib: accept option flags in run_diff_index()
  contrib/completion: extract common diff/difftool options
  git-diff.txt: backtick quote command text
  git-diff-index.txt: make --cached description a proper sentence
  t4068: remove unnecessary &gt;tmp
</content>
</entry>
<entry>
<title>completion: bash: remove old compat wrappers</title>
<updated>2020-10-28T21:30:59Z</updated>
<author>
<name>Felipe Contreras</name>
<email>felipe.contreras@gmail.com</email>
</author>
<published>2020-10-28T02:07:11Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=441ecdab37fefdacf32575a60aa523b2367c46f7'/>
<id>urn:sha1:441ecdab37fefdacf32575a60aa523b2367c46f7</id>
<content type='text'>
It's been eight years, more than enough time to move on.

Signed-off-by: Felipe Contreras &lt;felipe.contreras@gmail.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>completion: bash: cleanup cygwin check</title>
<updated>2020-10-28T21:30:59Z</updated>
<author>
<name>Felipe Contreras</name>
<email>felipe.contreras@gmail.com</email>
</author>
<published>2020-10-28T02:07:10Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=8030684beb7af806909c3fa79d3d4017121a753c'/>
<id>urn:sha1:8030684beb7af806909c3fa79d3d4017121a753c</id>
<content type='text'>
Avoid Yoda conditions, and use $OSTYPE.

Signed-off-by: Felipe Contreras &lt;felipe.contreras@gmail.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>completion: bash: trivial cleanup</title>
<updated>2020-10-28T21:30:59Z</updated>
<author>
<name>Felipe Contreras</name>
<email>felipe.contreras@gmail.com</email>
</author>
<published>2020-10-28T02:07:09Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=5a364d2a18311de1791375731678ca13cde89f13'/>
<id>urn:sha1:5a364d2a18311de1791375731678ca13cde89f13</id>
<content type='text'>
There's no need to set a variable we are not going to use.

Signed-off-by: Felipe Contreras &lt;felipe.contreras@gmail.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
</feed>
