Revert "Revert "fix git completion regression in homebrew""

This reverts commit b28a9383581b17327a67869beabcfc42569c9d18.