]> git.ozlabs.org Git - next-scripts/commitdiff
do_merge: don;t commit anything after an empty fixup
authorStephen Rothwell <sfr@canb.auug.org.au>
Tue, 4 Mar 2014 05:57:35 +0000 (16:57 +1100)
committerStephen Rothwell <sfr@canb.auug.org.au>
Tue, 4 Mar 2014 05:57:35 +0000 (16:57 +1100)
and don't show the diff

do_merge

index 0d1cc1b1f62bc24d7843ef928175947dbfd2dd2f..58ef07c9c7fa3e69be345c4beb0b8fb807f58dd8 100755 (executable)
--- a/do_merge
+++ b/do_merge
@@ -120,8 +120,10 @@ for h in $heads; do
                        git diff 2>&1 | egrep -q '<<<<<|^\*' && {
                                bash -i || exit
                        }
-                       GIT_EDITOR=: execute git commit -v -a
-                       execute git diff -M --stat --summary 'HEAD^..'
+                       [ "$(git status --porcelain)" ] && {
+                               GIT_EDITOR=: execute git commit -v -a
+                               execute git diff -M --stat --summary 'HEAD^..'
+                       }
                }
                ;;
        esac