[PATCH] Document two pack push-pull protocols.
[git] / git-pull-script
1 #!/bin/sh
2 #
3 . git-sh-setup-script || die "Not a git archive"
4
5 merge_repo=$1
6
7 merge_name=$(echo "$1" | sed 's:\.git/*$::')
8 merge_head=HEAD
9 type=head
10 if [ "$2" = "tag" ]; then
11    type=tag
12    shift
13 fi
14 if [ "$2" ]
15 then
16    merge_name="$type '$2' of $merge_name"
17    merge_head="refs/${type}s/$2"
18 fi
19
20 git-fetch-script "$merge_repo" "$merge_head" || exit 1
21
22 git-resolve-script \
23         "$(cat "$GIT_DIR"/HEAD)" \
24         "$(cat "$GIT_DIR"/FETCH_HEAD)" \
25         "Merge $merge_name"