Bash remote branch name completion reports an error if working copy 
contains a directory with the same name as remote name.

Steps:

$ git remote
origin 
$ mkdir origin
$ git pull origin <Tab>fatal: Not a git repository: 'origin' 

The problem is in the __gitdir() function. I've replaced it's complex logic 
with a simpler implementation that just let git to decide where is the git 
dir.
__gitdir ()
{
if [ "$1" ]; then
pushd "$1" >/dev/null
fi
# Current dir
git rev-parse --git-dir 2>/dev/null
if [ "$1" ]; then
popd >/dev/null
fi
}

It's not a fix because I didn't analyzed the code, just updated as I've 
suggested it should work and it works for me.

-- 
You received this message because you are subscribed to the Google Groups "Git 
for human beings" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to git-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to