diff --git a/builtin-commit.c b/builtin-commit.c
index b563a0d67cedc66825692863d9e57001fba35348..1e08399919fb40f710236d223c12528648e6f40a 100644 (file)
--- a/builtin-commit.c
+++ b/builtin-commit.c
}
/* Truncate the message just before the diff, if any. */
- p = strstr(sb.buf, "\ndiff --git a/");
- if (p != NULL)
- strbuf_setlen(&sb, p - sb.buf + 1);
+ if (verbose) {
+ p = strstr(sb.buf, "\ndiff --git ");
+ if (p != NULL)
+ strbuf_setlen(&sb, p - sb.buf + 1);
+ }
if (cleanup_mode != CLEANUP_NONE)
stripspace(&sb, cleanup_mode == CLEANUP_ALL);