Andrew's git
/
gitweb.git
/ diff
summary
|
log
|
commit
| diff |
tree
commit
grep
author
committer
pickaxe
?
re
Merge branch 'fc/completion-less-ls-remote'
author
Junio C Hamano
<gitster@pobox.com>
Tue, 11 Jun 2013 20:30:16 +0000
(13:30 -0700)
committer
Junio C Hamano
<gitster@pobox.com>
Tue, 11 Jun 2013 20:30:16 +0000
(13:30 -0700)
* fc/completion-less-ls-remote:
completion: avoid ls-remote in certain scenarios
contrib/completion/git-completion.bash
patch
|
blob
|
history
raw
(from parent 1:
9845bbb
)
diff --git
a/contrib/completion/git-completion.bash
b/contrib/completion/git-completion.bash
index 91234d47ad7f6e3ee0f45d53f67426eeba6bfaf2..56c52c6654dfe0d320515ad151c6afc292ec70f9 100644
(file)
--- a/
contrib/completion/git-completion.bash
+++ b/
contrib/completion/git-completion.bash
@@
-371,14
+371,8
@@
__git_refs ()
done
;;
*)
- git ls-remote "$dir" HEAD ORIG_HEAD 'refs/tags/*' 'refs/heads/*' 'refs/remotes/*' 2>/dev/null | \
- while read -r hash i; do
- case "$i" in
- *^{}) ;;
- refs/*) echo "${i#refs/*/}" ;;
- *) echo "$i" ;;
- esac
- done
+ echo "HEAD"
+ git for-each-ref --format="%(refname:short)" -- "refs/remotes/$dir/" | sed -e "s#^$dir/##"
;;
esac
}