* [PATCH] Handle commit messages without new line at end correctly
@ 2005-06-29 21:24 Fredrik Kuivinen
0 siblings, 0 replies; only message in thread
From: Fredrik Kuivinen @ 2005-06-29 21:24 UTC (permalink / raw)
To: git; +Cc: torvalds
Currently, if a commit message doesn't end with a new line the last
line in the message is omitted from the output. The following patch
fixes this bug.
Signed-Off-By: Fredrik Kuivinen <freku045@student.liu.se>
---
diff --git a/commit.c b/commit.c
--- a/commit.c
+++ b/commit.c
@@ -202,11 +202,11 @@ static int get_one_line(const char *msg,
while (len--) {
char c = *msg++;
+ if (!c)
+ break;
ret++;
if (c == '\n')
break;
- if (!c)
- return 0;
}
return ret;
}
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2005-06-29 21:21 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-06-29 21:24 [PATCH] Handle commit messages without new line at end correctly Fredrik Kuivinen
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox