Make "git resolve" take the merge message in $3
It used to do "Merge $3" as the message, but that ends up being inconvenient, and much more easily done inside git-pull-script instead. This makes the third argument to "git resolve" much easier to explain.
This commit is contained in:
parent
69a97f1d9b
commit
3ba513c32e
@ -22,4 +22,4 @@ git-fetch-script "$merge_repo" "$merge_head" || exit 1
|
|||||||
git-resolve-script \
|
git-resolve-script \
|
||||||
"$(cat "$GIT_DIR"/HEAD)" \
|
"$(cat "$GIT_DIR"/HEAD)" \
|
||||||
"$(cat "$GIT_DIR"/FETCH_HEAD)" \
|
"$(cat "$GIT_DIR"/FETCH_HEAD)" \
|
||||||
"$merge_name"
|
"Merge $merge_name"
|
||||||
|
@ -8,7 +8,7 @@
|
|||||||
|
|
||||||
head=$(git-rev-parse --revs-only "$1")
|
head=$(git-rev-parse --revs-only "$1")
|
||||||
merge=$(git-rev-parse --revs-only "$2")
|
merge=$(git-rev-parse --revs-only "$2")
|
||||||
merge_repo="$3"
|
merge_msg="$3"
|
||||||
|
|
||||||
dropheads() {
|
dropheads() {
|
||||||
rm -f -- "$GIT_DIR/MERGE_HEAD" \
|
rm -f -- "$GIT_DIR/MERGE_HEAD" \
|
||||||
@ -19,8 +19,8 @@ dropheads() {
|
|||||||
# The remote name is just used for the message,
|
# The remote name is just used for the message,
|
||||||
# but we do want it.
|
# but we do want it.
|
||||||
#
|
#
|
||||||
if [ -z "$head" -o -z "$merge" -o -z "$merge_repo" ]; then
|
if [ -z "$head" -o -z "$merge" -o -z "$merge_msg" ]; then
|
||||||
die "git-resolve-script <head> <remote> <merge-repo-name>"
|
die "git-resolve-script <head> <remote> <merge-message>"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
dropheads
|
dropheads
|
||||||
@ -47,7 +47,6 @@ if [ "$common" == "$head" ]; then
|
|||||||
fi
|
fi
|
||||||
echo "Trying to merge $merge into $head"
|
echo "Trying to merge $merge into $head"
|
||||||
git-read-tree -u -m $common $head $merge || exit 1
|
git-read-tree -u -m $common $head $merge || exit 1
|
||||||
merge_msg="Merge $merge_repo"
|
|
||||||
result_tree=$(git-write-tree 2> /dev/null)
|
result_tree=$(git-write-tree 2> /dev/null)
|
||||||
if [ $? -ne 0 ]; then
|
if [ $? -ne 0 ]; then
|
||||||
echo "Simple merge failed, trying Automatic merge"
|
echo "Simple merge failed, trying Automatic merge"
|
||||||
|
Loading…
Reference in New Issue
Block a user