Skip to content

Commit dd2195e

Browse files
committed
Merge branch 'jc/maint-1.6.3-graft-trailing-space' into maint
* jc/maint-1.6.3-graft-trailing-space: info/grafts: allow trailing whitespaces at the end of line
2 parents 69abb19 + fe0a3cb commit dd2195e

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

commit.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -132,8 +132,8 @@ struct commit_graft *read_graft_line(char *buf, int len)
132132
int i;
133133
struct commit_graft *graft = NULL;
134134

135-
if (buf[len-1] == '\n')
136-
buf[--len] = 0;
135+
while (len && isspace(buf[len-1]))
136+
buf[--len] = '\0';
137137
if (buf[0] == '#' || buf[0] == '\0')
138138
return NULL;
139139
if ((len + 1) % 41) {

0 commit comments

Comments
 (0)