When showing a commit message, do not lose an incomplete line.

This commit is contained in:
Linus Torvalds 2006-04-12 11:31:23 -07:00 committed by Junio C Hamano
parent 5ca64e488f
commit 684958ae61

View file

@ -400,11 +400,11 @@ static int get_one_line(const char *msg, unsigned long len)
while (len--) {
char c = *msg++;
if (!c)
break;
ret++;
if (c == '\n')
break;
if (!c)
return 0;
}
return ret;
}