summaryrefslogtreecommitdiff
path: root/git-resolve.sh
diff options
context:
space:
mode:
authorShawn Pearce <spearce@spearce.org>2006-07-11 02:25:09 -0400
committerJunio C Hamano <junkio@cox.net>2006-07-11 14:16:53 -0700
commit5a6852fef1d76369d6dfcad1a40ca5287bb781a6 (patch)
tree1cf72acbb3137ace5e0c5433223b78955d60342d /git-resolve.sh
parent09a28eccce58d349d93280fd3ac08c5ad0eaa3c5 (diff)
downloadgit-5a6852fef1d76369d6dfcad1a40ca5287bb781a6.tar.gz
Log ref changes made by resolve.
Since git-resolve is essentially a form of git-merge record any ref updates it makes similiar to how git-merge would record them. Signed-off-by: Shawn O. Pearce <spearce@spearce.org> Signed-off-by: Junio C Hamano <junkio@cox.net>
Diffstat (limited to 'git-resolve.sh')
-rwxr-xr-xgit-resolve.sh7
1 files changed, 5 insertions, 2 deletions
diff --git a/git-resolve.sh b/git-resolve.sh
index 1c7aaefa25..a7bc680d90 100755
--- a/git-resolve.sh
+++ b/git-resolve.sh
@@ -15,6 +15,7 @@ dropheads() {
head=$(git-rev-parse --verify "$1"^0) &&
merge=$(git-rev-parse --verify "$2"^0) &&
+merge_name="$2" &&
merge_msg="$3" || usage
#
@@ -43,7 +44,8 @@ case "$common" in
"$head")
echo "Updating from $head to $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 +102,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