Sync with 2.12.5
[gitweb.git] / builtin / commit.c
index 1d805f5da8abd1cfafc41c5c47fd048b2549fbf4..aff6bf7aadc6f5209d5f8fc22dfde055a96214c4 100644 (file)
@@ -984,7 +984,7 @@ static int rest_is_empty(struct strbuf *sb, int start)
        int i, eol;
        const char *nl;
 
-       /* Check if the rest is just whitespace and Signed-of-by's. */
+       /* Check if the rest is just whitespace and Signed-off-by's. */
        for (i = start; i < sb->len; i++) {
                nl = memchr(sb->buf + i, '\n', sb->len - i);
                if (nl)
@@ -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);