Merge branch 'ph/tag-force-no-warn-on-creation' into maint
[gitweb.git] / git-rebase--interactive.sh
index 5db9e2d3f3666af232e7063bf2c46f3ea8ce79c1..048a140a6f6dd565a0d0d98b3b41439298626a96 100644 (file)
@@ -193,6 +193,11 @@ is_empty_commit() {
        test "$tree" = "$ptree"
 }
 
+is_merge_commit()
+{
+       git rev-parse --verify --quiet "$1"^2 >/dev/null 2>&1
+}
+
 # Run command with GIT_AUTHOR_NAME, GIT_AUTHOR_EMAIL, and
 # GIT_AUTHOR_DATE exported from the current environment.
 do_with_author () {
@@ -878,7 +883,7 @@ git rev-list $merges_option --pretty=oneline --abbrev-commit \
 while read -r shortsha1 rest
 do
 
-       if test -z "$keep_empty" && is_empty_commit $shortsha1
+       if test -z "$keep_empty" && is_empty_commit $shortsha1 && ! is_merge_commit $shortsha1
        then
                comment_out="$comment_char "
        else