Skip to content

Commit

Permalink
Merge branch 'jc/maint-1.6.3-graft-trailing-space'
Browse files Browse the repository at this point in the history
* jc/maint-1.6.3-graft-trailing-space:
  info/grafts: allow trailing whitespaces at the end of line
  • Loading branch information
Junio C Hamano committed Oct 31, 2009
2 parents 4b3c180 + fe0a3cb commit 97d484b
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 @@ -132,8 +132,8 @@ struct commit_graft *read_graft_line(char *buf, int len)
int i;
struct commit_graft *graft = NULL;

if (buf[len-1] == '\n')
buf[--len] = 0;
while (len && isspace(buf[len-1]))
buf[--len] = '\0';
if (buf[0] == '#' || buf[0] == '\0')
return NULL;
if ((len + 1) % 41) {
Expand Down

0 comments on commit 97d484b

Please sign in to comment.