Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 674862

Summary: >=dev-vcs/git-2.20 has broken bashcompletion
Product: Gentoo Linux Reporter: Michal 'vorner' Vaner <vorner>
Component: Current packagesAssignee: Robin Johnson <robbat2>
Status: RESOLVED INVALID    
Severity: minor CC: polynomial-c
Priority: Normal    
Version: unspecified   
Hardware: All   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---
Attachments: emerge --info

Description Michal 'vorner' Vaner 2019-01-08 09:58:49 UTC
Created attachment 560348 [details]
emerge --info

If I use git-2.19.2 (and a lot of older versions too), have enabled bash completion and type `git check<TAB>`, it completes to `git checkout`.

When I upgrade to git-2.20, this stops working and I have to type the whole subcommand by hand, which is annoying. However, parts of the completion still works, because when I type `git checkout mas<TAB>`, it correctly completes to master.
Comment 1 Thomas Deutschmann (RETIRED) gentoo-dev 2019-01-15 01:11:30 UTC
Are you still able to reproduce with git-2.20.1? I cannot...
Comment 2 Michal 'vorner' Vaner 2019-01-17 21:30:23 UTC
Yes, I can still reproduce (after emerging it, I need to clone and open a new shell, so the new definitions are loaded).
Comment 3 Lars Wendler (Polynomial-C) (RETIRED) gentoo-dev 2019-01-29 10:49:05 UTC
Just to be clear here...

the bug you see is that when you have git older than 2.20 installed, then upgrade git to 2.20 or newer you have the issue with bash-completion _until_ you start a new shell/session?
Comment 4 Michal 'vorner' Vaner 2019-01-29 11:18:51 UTC
No, if it was that, I'd just opened a new session and wouldn't bother with reporting it O:-).

* I have git 2.19.2. Everything works fine.
* I upgrade to git 2.20.*. In existing session, everything still works fine.
* I open a new shell. Completion of git subcommands no longer works in the new session.
Comment 5 Lars Wendler (Polynomial-C) (RETIRED) gentoo-dev 2019-01-29 11:37:26 UTC
(In reply to Michal 'vorner' Vaner from comment #4)
> No, if it was that, I'd just opened a new session and wouldn't bother with
> reporting it O:-).
> 
> * I have git 2.19.2. Everything works fine.
> * I upgrade to git 2.20.*. In existing session, everything still works fine.
> * I open a new shell. Completion of git subcommands no longer works in the
> new session.

Thanks. So this needs to get reported to upstream...
Comment 6 Michal 'vorner' Vaner 2019-04-23 09:55:18 UTC
I've discovered the cause. My $HOME/.bash_completion.d/git was an outdated copy from some old version of git, not a symlink to /usr/share/bash-completion/completions/git. The old version didn't work well with the new binary.

Sorry for the fuzz :-|