Merge branch 'pw/rebase-i-regression-fix-tests' into maint
[gitweb.git] / builtin / commit.c
index 1d805f5da8abd1cfafc41c5c47fd048b2549fbf4..8d1cac0629e7079daeef57ac049c0c7d7549e6d0 100644 (file)
@@ -1735,7 +1735,7 @@ int cmd_commit(int argc, const char **argv, const char *prefix)
 
        if (verbose || /* Truncate the message just before the diff, if any. */
            cleanup_mode == CLEANUP_SCISSORS)
-               wt_status_truncate_message_at_cut_line(&sb);
+               strbuf_setlen(&sb, wt_status_locate_end(sb.buf, sb.len));
 
        if (cleanup_mode != CLEANUP_NONE)
                strbuf_stripspace(&sb, cleanup_mode == CLEANUP_ALL);