@matheusbsbs / matheus-bagliano / commits / 153e98d263
Fork 0

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>

Santi Béjar committed Jan 30, 2007 at 10:36 UTC 153e98d263a825c905f2ef4277b29d1fd5e09b42
1 file changed +1 -1
git-parse-remote.sh
+1 -1
@@ -183,7 +183,7 @@ canon_refs_list_for_fetch () {
183 done
184 fi
185 case "$remote" in
186 - '') remote=HEAD ;;
186 + '' | HEAD ) remote=HEAD ;;
187 refs/heads/* | refs/tags/* | refs/remotes/*) ;;
188 heads/* | tags/* | remotes/* ) remote="refs/$remote" ;;
189 *) remote="refs/heads/$remote" ;;