2005-04-19 03:15:10 +08:00
|
|
|
#!/bin/sh
|
|
|
|
#
|
|
|
|
merge_repo=$1
|
2005-05-26 05:05:13 +08:00
|
|
|
|
|
|
|
merge_name=$(echo "$1" | sed 's:\.git/*$::')
|
|
|
|
merge_head=HEAD
|
2005-06-28 11:10:32 +08:00
|
|
|
type=head
|
|
|
|
if [ "$2" = "tag" ]; then
|
|
|
|
type=tag
|
|
|
|
shift
|
|
|
|
fi
|
2005-05-26 05:05:13 +08:00
|
|
|
if [ "$2" ]
|
|
|
|
then
|
2005-06-28 11:10:32 +08:00
|
|
|
merge_name="$type '$2' of $merge_name"
|
2005-06-29 01:15:10 +08:00
|
|
|
merge_head="refs/${type}s/$2"
|
2005-05-26 05:05:13 +08:00
|
|
|
fi
|
2005-04-19 03:15:10 +08:00
|
|
|
|
2005-05-10 13:57:58 +08:00
|
|
|
: ${GIT_DIR=.git}
|
|
|
|
: ${GIT_OBJECT_DIRECTORY="${SHA1_FILE_DIRECTORY-"$GIT_DIR/objects"}"}
|
|
|
|
|
2005-06-07 08:40:22 +08:00
|
|
|
git-fetch-script "$merge_repo" "$merge_head" || exit 1
|
2005-04-19 03:15:10 +08:00
|
|
|
|
2005-05-10 13:57:58 +08:00
|
|
|
git-resolve-script \
|
|
|
|
"$(cat "$GIT_DIR"/HEAD)" \
|
2005-06-22 05:04:13 +08:00
|
|
|
"$(cat "$GIT_DIR"/FETCH_HEAD)" \
|
2005-05-26 05:05:13 +08:00
|
|
|
"$merge_name"
|