We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents 4b3c180 + fe0a3cb commit 97d484bCopy full SHA for 97d484b
1 file changed
commit.c
@@ -132,8 +132,8 @@ struct commit_graft *read_graft_line(char *buf, int len)
132
int i;
133
struct commit_graft *graft = NULL;
134
135
- if (buf[len-1] == '\n')
136
- buf[--len] = 0;
+ while (len && isspace(buf[len-1]))
+ buf[--len] = '\0';
137
if (buf[0] == '#' || buf[0] == '\0')
138
return NULL;
139
if ((len + 1) % 41) {
0 commit comments