提交 153e98d2 编写于 作者: S Santi Béjar 提交者: Junio C Hamano

git-fetch: Allow fetching the remote HEAD

... with:

$ git fetch ${remote} HEAD

Also

$ git fetch ${remote} :${localref}

worked, but

$ git fetch ${remote} HEAD:{localref}

didn't. Now both are equivalent.
Signed-off-by: NSanti Béjar <sbejar@gmail.com>
Signed-off-by: NJunio C Hamano <junkio@cox.net>
上级 3740b04f
......@@ -183,7 +183,7 @@ canon_refs_list_for_fetch () {
done
fi
case "$remote" in
'') remote=HEAD ;;
'' | HEAD ) remote=HEAD ;;
refs/heads/* | refs/tags/* | refs/remotes/*) ;;
heads/* | tags/* | remotes/* ) remote="refs/$remote" ;;
*) remote="refs/heads/$remote" ;;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册