Support +<src>:<dst> format in push as well.
[git/git-svn.git] / git-pull-script
blob7016fbf943406d8e647e7a02f283fa10ab134905
1 #!/bin/sh
3 # Copyright (c) 2005 Junio C Hamano
5 # Fetch one or more remote refs and merge it/them into the current HEAD.
7 . git-sh-setup-script || die "Not a git archive"
8 git-fetch-script "$@" || exit 1
9 merge_head=$(sed -e 's/ .*//' "$GIT_DIR"/FETCH_HEAD | tr '\012' ' ')
10 merge_name=$(sed -e 's/^[0-9a-f]* //' "$GIT_DIR"/FETCH_HEAD |
11 tr '\012' ' ')
13 case "$merge_head" in
14 '')
15 echo >&2 "No changes."
16 exit 0
18 *' '?*)
19 echo >&2 "Pulling more than one heads; making an Octopus."
20 exec git-octopus-script
22 esac
24 git-resolve-script \
25 "$(cat "$GIT_DIR"/HEAD)" \
26 $merge_head "Merge $merge_name"