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