Split "git-pull-script" into two parts
[git/git.git] / git-pull-script
CommitLineData
839a7a06
LT
1#!/bin/sh
2#
3# use "$1" or something in a real script, this
4# just hard-codes it.
5#
6merge_repo=$1
552e2bd1 7merge_name=${2:-HEAD}
839a7a06
LT
8
9echo "Getting object database"
d840b3b2 10rsync -avz --ignore-existing $merge_repo/objects/. ${SHA1_FILE_DIRECTORY:-.git/objects}/.
839a7a06 11
552e2bd1
LT
12echo "Getting remote $merge_name"
13rsync -L $merge_repo/$merge_name .git/MERGE_HEAD || exit 1
839a7a06 14
67cc5c4e 15git-resolve-script "$(cat .git/HEAD)" "$(cat .git/MERGE_HEAD)" "$merge_repo"