Skip to content

Commit

Permalink
When showing a commit message, do not lose an incomplete line.
Browse files Browse the repository at this point in the history
  • Loading branch information
Linus Torvalds authored and Junio C Hamano committed Apr 12, 2006
1 parent 5ca64e4 commit 684958a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions commit.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down

0 comments on commit 684958a

Please sign in to comment.