X-Git-Url: http://git.tremily.us/?a=blobdiff_plain;f=git-rebase--interactive.sh;h=8ed7fccc18507b6f3e2508bb117ce056a764de77;hb=d2216a4b133f90a543a0e4c4a9f9809a043012d6;hp=44901d53c43d972e03a71bfbe0b769f2e8f22d7b;hpb=1f0335a63fede94308050a70a47ab7ee92c25d95;p=git.git diff --git a/git-rebase--interactive.sh b/git-rebase--interactive.sh index 44901d53c..8ed7fccc1 100644 --- a/git-rebase--interactive.sh +++ b/git-rebase--interactive.sh @@ -190,6 +190,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 () { @@ -874,7 +879,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="# " else