summaryrefslogtreecommitdiff
path: root/git-parse-remote.sh
diff options
context:
space:
mode:
authorSanti Béjar <sbejar@gmail.com>2007-01-30 10:36:24 +0100
committerJunio C Hamano <junkio@cox.net>2007-01-30 02:30:25 -0800
commit153e98d263a825c905f2ef4277b29d1fd5e09b42 (patch)
tree23d8c23cd0b74a397d95b6a859f9563e88c790af /git-parse-remote.sh
parent3740b04f6c1dd485a8e717ed6d8c516cedc27063 (diff)
downloadgit-153e98d263a825c905f2ef4277b29d1fd5e09b42.tar.gz
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>
Diffstat (limited to 'git-parse-remote.sh')
-rwxr-xr-xgit-parse-remote.sh2
1 files changed, 1 insertions, 1 deletions
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" ;;