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: Santi Béjar <sbejar@gmail.com>
Signed-off-by: Junio C Hamano <junkio@cox.net>
This commit is contained in:
Santi Béjar 2007-01-30 10:36:24 +01:00 коммит произвёл Junio C Hamano
Родитель 3740b04f6c
Коммит 153e98d263
1 изменённых файлов: 1 добавлений и 1 удалений

Просмотреть файл

@ -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" ;;