提交 d23e7570 编写于 作者: I Ian Ward Comfort 提交者: Junio C Hamano

bash: complete *_HEAD refs if present

We already complete HEAD, of course, and might as well complete the other
common refs mentioned in the rev-parse man page: FETCH_HEAD, ORIG_HEAD, and
MERGE_HEAD.
Signed-off-by: NIan Ward Comfort <icomfort@stanford.edu>
Acked-by: NShawn O. Pearce <spearce@spearce.org>
Signed-off-by: NJunio C Hamano <gitster@pobox.com>
上级 73252839
......@@ -250,7 +250,9 @@ __git_refs ()
refs="${cur%/*}"
;;
*)
if [ -e "$dir/HEAD" ]; then echo HEAD; fi
for i in HEAD FETCH_HEAD ORIG_HEAD MERGE_HEAD; do
if [ -e "$dir/$i" ]; then echo $i; fi
done
format="refname:short"
refs="refs/tags refs/heads refs/remotes"
;;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册