aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xgit-parse-remote-script4
1 files changed, 4 insertions, 0 deletions
diff --git a/git-parse-remote-script b/git-parse-remote-script
index cf3788425..43b436803 100755
--- a/git-parse-remote-script
+++ b/git-parse-remote-script
@@ -81,10 +81,14 @@ canon_refs_list_for_fetch () {
local=$(expr "$ref" : '[^:]*:\(.*\)')
case "$remote" in
'') remote=HEAD ;;
+ refs/heads/* | refs/tags/*) ;;
+ heads/* | tags/* ) remote="refs/$remote" ;;
*) remote="refs/heads/$remote" ;;
esac
case "$local" in
'') local= ;;
+ refs/heads/* | refs/tags/*) ;;
+ heads/* | tags/* ) local="refs/$local" ;;
*) local="refs/heads/$local" ;;
esac
echo "${force}${remote}:${local}"