From: Santi Béjar Date: Tue, 30 Jan 2007 09:36:24 +0000 (+0100) Subject: git-fetch: Allow fetching the remote HEAD X-Git-Tag: v1.5.0-rc3~15 X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=153e98d263a825c905f2ef4277b29d1fd5e09b42;p=git.git 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 Signed-off-by: Junio C Hamano --- diff --git a/git-parse-remote.sh b/git-parse-remote.sh index 9d269671d..3e783b7b0 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" ;;