[PATCH] Fixup t/t5300 unit tests broken by 5f3de58ff85c49620ae2a1722d8d4d37c881a054
[git/kirr.git] / git-pull-script
blob961edc481b96b0081c816520bc0c4e2cfe5a43f8
1 #!/bin/sh
3 merge_repo=$1
5 merge_name=$(echo "$1" | sed 's:\.git/*$::')
6 merge_head=HEAD
7 type=head
8 if [ "$2" = "tag" ]; then
9 type=tag
10 shift
12 if [ "$2" ]
13 then
14 merge_name="$type '$2' of $merge_name"
15 merge_head="refs/${type}s/$2"
18 : ${GIT_DIR=.git}
19 : ${GIT_OBJECT_DIRECTORY="${SHA1_FILE_DIRECTORY-"$GIT_DIR/objects"}"}
21 git-fetch-script "$merge_repo" "$merge_head" || exit 1
23 git-resolve-script \
24 "$(cat "$GIT_DIR"/HEAD)" \
25 "$(cat "$GIT_DIR"/FETCH_HEAD)" \
26 "$merge_name"