X-Git-Url: https://git.tokkee.org/?a=blobdiff_plain;f=git-resolve.sh;h=36b90e38494eb79b4859cf59301b5a4e6ccccea1;hb=fd2a75972e90d34bc8d4bebe1d669645557a2192;hp=1c7aaefa2528b73fea3eee22b086b94fa91854c5;hpb=3d990f110c2e5b8df83f6ab3ef83497f43c7fd47;p=git.git
diff --git a/git-resolve.sh b/git-resolve.sh
index 1c7aaefa2..36b90e384 100755
--- a/git-resolve.sh
+++ b/git-resolve.sh
@@ -5,6 +5,10 @@
# Resolve two trees.
#
+echo 'WARNING: This command is DEPRECATED and will be removed very soon.' >&2
+echo 'WARNING: Please use git-merge or git-pull instead.' >&2
+sleep 2
+
USAGE='
'
. git-sh-setup
@@ -15,6 +19,7 @@ dropheads() {
head=$(git-rev-parse --verify "$1"^0) &&
merge=$(git-rev-parse --verify "$2"^0) &&
+merge_name="$2" &&
merge_msg="$3" || usage
#
@@ -41,9 +46,10 @@ case "$common" in
exit 0
;;
"$head")
- echo "Updating from $head to $merge"
+ echo "Updating $(git-rev-parse --short $head)..$(git-rev-parse --short $merge)"
git-read-tree -u -m $head $merge || exit 1
- git-update-ref HEAD "$merge" "$head"
+ git-update-ref -m "resolve $merge_name: Fast forward" \
+ HEAD "$merge" "$head"
git-diff-tree -p $head $merge | git-apply --stat
dropheads
exit 0
@@ -100,6 +106,7 @@ if [ $? -ne 0 ]; then
fi
result_commit=$(echo "$merge_msg" | git-commit-tree $result_tree -p $head -p $merge)
echo "Committed merge $result_commit"
-git-update-ref HEAD "$result_commit" "$head"
+git-update-ref -m "resolve $merge_name: In-index merge" \
+ HEAD "$result_commit" "$head"
git-diff-tree -p $head $result_commit | git-apply --stat
dropheads