repo_bash_completion: fix git autocompletion path

/usr/share/git/git-prompt.sh no longer exists on Ubuntu, __gitdir is now
defined in /usr/share/bash-completion/completions/git. Source that file
instead.
The chroot still uses /usr/share/git/git-prompt.sh, so we still source
that file if it exists.

BUG=None
TEST=". repo_bash_completion", no "not a function" errors about
__gitdir anymore, completion works.
TEST=cros_workon --host cros-devutils start
TEST=sudo emerge cros-devutils
TEST=repo completion still works in the chroot

Change-Id: I7804da481d0e04c6c092af0616302f71336e5307
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/dev-util/+/2242345
Reviewed-by: Mike Frysinger <vapier@chromium.org>
Tested-by: Nicolas Norvez <norvez@chromium.org>
1 file changed