Andrew's git
/
gitweb.git
/ blobdiff
summary
|
log
|
commit
|
diff
|
tree
commit
grep
author
committer
pickaxe
?
re
completion: ensure that the repository path given on the command line exists
[gitweb.git]
/
contrib
/
completion
/
git-completion.bash
diff --git
a/contrib/completion/git-completion.bash
b/contrib/completion/git-completion.bash
index a43322b04a8e923edc7c2567a118966b35f6caa1..92801329268232a2ae048b0dea615f67069607e9 100644
(file)
--- a/
contrib/completion/git-completion.bash
+++ b/
contrib/completion/git-completion.bash
@@
-40,6
+40,7
@@
__gitdir ()
{
if [ -z "${1-}" ]; then
if [ -n "${__git_dir-}" ]; then
+ test -d "$__git_dir" || return 1
echo "$__git_dir"
elif [ -n "${GIT_DIR-}" ]; then
test -d "${GIT_DIR-}" || return 1