Skip to content

Commit

Permalink
Log ref changes made by resolve.
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Shawn Pearce authored and Junio C Hamano committed Jul 11, 2006
1 parent 09a28ec commit 5a6852f
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions git-resolve.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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

#
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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

0 comments on commit 5a6852f

Please sign in to comment.