git-pull-script: pretty-print the merge head information
[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 from
10
11         $merge_name"
12    merge_head="refs/heads/$2"
13 fi
14
15 : ${GIT_DIR=.git}
16 : ${GIT_OBJECT_DIRECTORY="${SHA1_FILE_DIRECTORY-"$GIT_DIR/objects"}"}
17
18 git-fetch-script "$merge_repo" "$merge_head"
19
20 git-resolve-script \
21         "$(cat "$GIT_DIR"/HEAD)" \
22         "$(cat "$GIT_DIR"/MERGE_HEAD)" \
23         "$merge_name"