3 USAGE
='[--all] [--tags] [--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?"
41 remote
=$
(get_remote_url
"$@")
49 set x $
(cd "$GIT_DIR/refs" && find tags
-type f
-print) ;;
51 set x $
(cd "$GIT_DIR/refs" && find tags
-type f
-print) \
52 $
(get_remote_refs_for_push
"$@") ;;
54 set x $
(get_remote_refs_for_push
"$@") ;;
58 shift ;# away the initial 'x'
60 # Now we have explicit refs from the command line or from remotes/
61 # shorthand, or --tags. Falling back on the current branch if we still
62 # do not have any may be an alternative, but prevent mistakes for now.
66 die
"No refs given to be pushed." ;;
71 die
"Cannot use READ-ONLY transport to push to $remote" ;;
73 die
"Pushing with rsync transport is deprecated" ;;
76 set x
"$remote" "$@"; shift
77 test "$has_all" && set x
"$has_all" "$@" && shift
78 test "$has_force" && set x
"$has_force" "$@" && shift
79 test "$has_exec" && set x
"$has_exec" "$@" && shift
83 exec git-http-push
"$@";;
85 exec git-send-pack
"$@";;