checkout: check return value of resolve_refdup before using hash
[gitweb.git] / git-rebase--interactive.sh
index b0a6f2b7bae0d4ccd5fcf00ae4dac6c29e50bd71..4734094a3f1aaa7d7c767a0740b46dd6abdd6f7a 100644 (file)
@@ -425,7 +425,7 @@ update_squash_messages () {
        if test -f "$squash_msg"; then
                mv "$squash_msg" "$squash_msg".bak || exit
                count=$(($(sed -n \
-                       -e "1s/^$comment_char.*\([0-9][0-9]*\).*/\1/p" \
+                       -e "1s/^$comment_char[^0-9]*\([0-9][0-9]*\).*/\1/p" \
                        -e "q" < "$squash_msg".bak)+1))
                {
                        printf '%s\n' "$comment_char $(eval_ngettext \