2 . git-sh-setup-script || die
"Not a git archive"
4 # Parse out parameters and then stop at remote, so that we can
5 # translate it using .git/branches information
11 while case "$#" in 0) break ;; esac
21 die
"Unknown parameter $1" ;;
33 *:* |
/* | ..
/* | .
/* )
34 # An URL, host:/path/to/git, absolute and relative paths.
38 if expr "$remote" : '..*/..*' >/dev
/null
40 # a short-hand followed by a trailing path
41 shorthand
=$
(expr "$remote" : '\([^/]*\)')
42 remainder
=$
(expr "$remote" : '[^/]*\(/.*\)$')
47 remote
=$
(sed -e 's/#.*//' "$GIT_DIR/branches/$remote") &&
48 expr "$remote" : '..*:' >/dev
/null
&&
49 remote
="$remote$remainder" ||
50 die
"Cannot parse remote $remote"
55 http
://* | https
://* | git
://* | rsync
://* )
56 die
"Cannot push to $remote" ;;
59 set x
"$remote" "$@"; shift
60 test "$has_all" && set x
"$has_all" "$@" && shift
61 test "$has_force" && set x
"$has_force" "$@" && shift
62 test "$has_exec" && set x
"$has_exec" "$@" && shift
64 exec git-send-pack
"$@"