Code

git-diff: don't squelch the new SHA1 in submodule diffs
[git.git] / git-rebase--interactive.sh
index ec798a16e98d7c503071d01fd79b3d156e77058c..abc2b1c3e06bf1904ed92a691e917e8718e9e299 100755 (executable)
@@ -190,7 +190,7 @@ nth_string () {
 
 make_squash_message () {
        if test -f "$SQUASH_MSG"; then
-               COUNT=$(($(sed -n "s/^# This is [^0-9]*\([0-9]\+\).*/\1/p" \
+               COUNT=$(($(sed -n "s/^# This is [^0-9]*\([1-9][0-9]*\).*/\1/p" \
                        < "$SQUASH_MSG" | tail -n 1)+1))
                echo "# This is a combination of $COUNT commits."
                sed -n "2,\$p" < "$SQUASH_MSG"