mirror of
https://github.com/git/git.git
synced 2024-10-28 12:59:41 +01:00
When showing a commit message, do not lose an incomplete line.
This commit is contained in:
parent
5ca64e488f
commit
684958ae61
1 changed files with 2 additions and 2 deletions
4
commit.c
4
commit.c
|
@ -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;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue