Do a cross-project merge of Paul Mackerras' gitk visualizer
[git/git.git] / git-pull-script
1 #!/bin/sh
2 #
3 merge_repo=$1
4
5 merge_name=$(echo "$1" | sed 's:\.git/*$::')
6 merge_head=HEAD
7 if [ "$2" ]
8 then
9 merge_name="'$2' branch of $merge_name"
10 merge_head="refs/heads/$2"
11 fi
12
13 : ${GIT_DIR=.git}
14 : ${GIT_OBJECT_DIRECTORY="${SHA1_FILE_DIRECTORY-"$GIT_DIR/objects"}"}
15
16 git-fetch-script "$merge_repo" "$merge_head" || exit 1
17
18 git-resolve-script \
19 "$(cat "$GIT_DIR"/HEAD)" \
20 "$(cat "$GIT_DIR"/FETCH_HEAD)" \
21 "$merge_name"