git bash completion for checkout returns only tags
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
git |
Unknown
|
Unknown
|
|||
git (Ubuntu) |
Confirmed
|
Undecided
|
Unassigned |
Bug Description
The bash completion code for git returns only tags. As a result, substrings that match both tags and filenames will only result in the tag choices being offered, to the exclusion of the filenames. (If the substring matches only filenames, then bash itself will offer the filename completions.)
This is really annoying when you're using git-buildpackage, as you'll have tags of the form debian/... as well as files in a debian/ directory. The bash completion code for git should also return filenames for `git checkout <TAB>`.
Steps to reproduce:
mkdir foo
cd foo
git init
mkdir debian
touch debian/control
git add debian/control
git commit -am "blah"
git tag debian/1.0.0-1
git checkout deb<TAB>
Expected result:
debian/1.0.0-1 debian/control
$ git checkout deb
Actual result:
$ git checkout debian/1.0.0-1
ProblemType: Bug
DistroRelease: Ubuntu 12.04
Package: git 1:1.7.9.1-1 [modified: usr/bin/git usr/bin/
ProcVersionSign
Uname: Linux 3.2.0-21-generic x86_64
NonfreeKernelMo
ApportVersion: 2.0-0ubuntu4
Architecture: amd64
Date: Wed Apr 4 16:40:27 2012
EcryptfsInUse: Yes
InstallationMedia: Ubuntu 12.04 LTS "Precise Pangolin" - Beta amd64 (20120330)
ProcEnviron:
TERM=xterm
PATH=(custom, user)
LANG=en_US.UTF-8
SHELL=/bin/bash
SourcePackage: git
UpgradeStatus: No upgrade log present (probably fresh install)
Changed in git (Ubuntu): | |
status: | New → Confirmed |
Forwarded upstream here:
http:// code.google. com/p/git- core/issues/ detail? id=11