From: Avery Pennarun Date: Sat, 30 May 2009 07:33:17 +0000 (-0400) Subject: Don't squash-merge if the old and new commits are the same. X-Git-Tag: v1.7.11-rc0~176^2~54 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=eb4fb91094cf5e20bf7570da3fadb50e444284bc;p=git.git Don't squash-merge if the old and new commits are the same. --- diff --git a/git-subtree.sh b/git-subtree.sh index 863e28bb7..f7fe11117 100755 --- a/git-subtree.sh +++ b/git-subtree.sh @@ -523,6 +523,10 @@ cmd_merge() set $first_split old=$1 sub=$2 + if [ "$sub" = "$rev" ]; then + say "Subtree is already at commit $rev." + exit 0 + fi new=$(new_squash_commit "$old" "$sub" "$rev") || exit $? debug "New squash commit: $new" rev="$new"