Merge branch 'wd/userdiff-css'
[gitweb.git] / git-rebase--merge.sh
index 2cc2a6d2734c0ef12222004f22d717f4f724d82f..8d43db9069f5c478fa6cb2deb6cf7d1d37f1e6b2 100644 (file)
@@ -67,7 +67,9 @@ call_merge () {
                GIT_MERGE_VERBOSITY=1 && export GIT_MERGE_VERBOSITY
        fi
        test -z "$strategy" && strategy=recursive
-       eval 'git-merge-$strategy' $strategy_opts '"$cmt^" -- "$hd" "$cmt"'
+       # If cmt doesn't have a parent, don't include it as a base
+       base=$(git rev-parse --verify --quiet $cmt^)
+       eval 'git-merge-$strategy' $strategy_opts $base ' -- "$hd" "$cmt"'
        rv=$?
        case "$rv" in
        0)