summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLibravatar Junio C Hamano <junkio@cox.net>2006-04-22 03:06:58 -0700
committerLibravatar Junio C Hamano <junkio@cox.net>2006-04-22 03:06:58 -0700
commitf1f114d0807a8632bfccda9f65bf783a47b4b8b6 (patch)
tree2d7d4ad823d19cae7f9063194fc0f74ff2766033
parentMerge branch 'jc/cc-stat' into next (diff)
parentgit-fmt-patch: thinkofix to show [PATCH] properly. (diff)
downloadtgif-f1f114d0807a8632bfccda9f65bf783a47b4b8b6.tar.xz
Merge branch 'jc/fmt-patch' into next
* jc/fmt-patch: git-fmt-patch: thinkofix to show [PATCH] properly.
-rw-r--r--commit.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/commit.c b/commit.c
index 06e00987cc..f4e4eea014 100644
--- a/commit.c
+++ b/commit.c
@@ -574,8 +574,9 @@ unsigned long pretty_print_commit(enum cmit_fmt fmt, const struct commit *commit
}
if (subject) {
- memcpy(buf + offset, subject, 9);
- offset += 9;
+ int slen = strlen(subject);
+ memcpy(buf + offset, subject, slen);
+ offset += slen;
}
memset(buf + offset, ' ', indent);
memcpy(buf + offset + indent, line, linelen);