3 USAGE='[--all] [--force] <repository> [<refspec>...]'
6 # Parse out parameters and then stop at remote, so that we can
7 # translate it using .git/branches information
14 while case "$#" in 0) break ;; esac
36 echo "Where would you want to push today?"
39 if test ",$has_all,$do_tags," = ",--all,yes,"
45 remote=$(get_remote_url "$@")
48 '') set x $(get_remote_refs_for_push "$@") ;;
54 set "$@" $(cd "$GIT_DIR/refs" && find tags -type f -print) ;;
57 # Now we have explicit refs from the command line or from remotes/
58 # shorthand, or --tags. Falling back on the current branch if we still
59 # do not have any may be an alternative, but prevent mistakes for now.
63 die "No refs given to be pushed." ;;
68 die "Cannot use READ-ONLY transport to push to $remote" ;;
70 die "Pushing with rsync transport is deprecated" ;;
73 set x "$remote" "$@"; shift
74 test "$has_all" && set x "$has_all" "$@" && shift
75 test "$has_force" && set x "$has_force" "$@" && shift
76 test "$has_exec" && set x "$has_exec" "$@" && shift
80 exec git-http-push "$@";;
82 exec git-send-pack "$@";;