Andrew's git
/
gitweb.git
/ diff
summary
|
log
|
commit
| diff |
tree
commit
grep
author
committer
pickaxe
?
re
Merge branch 'js/completion-hide-not-a-repo'
author
Junio C Hamano
<gitster@pobox.com>
Tue, 21 Oct 2014 20:28:50 +0000
(13:28 -0700)
committer
Junio C Hamano
<gitster@pobox.com>
Tue, 21 Oct 2014 20:28:50 +0000
(13:28 -0700)
Some internal error messages leaked out of the bash completion when
typing "git cmd <TAB>" and the machinery tried to complete
refnames.
* js/completion-hide-not-a-repo:
completion: silence "fatal: Not a git repository" error
contrib/completion/git-completion.bash
patch
|
blob
|
history
raw
(from parent 1:
48f662d
)
diff --git
a/contrib/completion/git-completion.bash
b/contrib/completion/git-completion.bash
index d548e99ebc213cc107b61acbdafa065bbb46dc30..8704451e52e9ed4239ec7a8e96d3fd8e6be4cb01 100644
(file)
--- a/
contrib/completion/git-completion.bash
+++ b/
contrib/completion/git-completion.bash
@@
-384,7
+384,8
@@
__git_refs ()
;;
*)
echo "HEAD"
- git for-each-ref --format="%(refname:short)" -- "refs/remotes/$dir/" | sed -e "s#^$dir/##"
+ git for-each-ref --format="%(refname:short)" -- \
+ "refs/remotes/$dir/" 2>/dev/null | sed -e "s#^$dir/##"
;;
esac
}