From 153e98d263a825c905f2ef4277b29d1fd5e09b42 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Santi=20B=C3=A9jar?= Date: Tue, 30 Jan 2007 10:36:24 +0100 Subject: [PATCH] git-fetch: Allow fetching the remote HEAD MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ... 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 Signed-off-by: Junio C Hamano --- git-parse-remote.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/git-parse-remote.sh b/git-parse-remote.sh index 9d269671de..3e783b7b05 100755 --- a/git-parse-remote.sh +++ b/git-parse-remote.sh @@ -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" ;;