We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 402461a commit 5bc4ce5Copy full SHA for 5bc4ce5
commit.c
@@ -161,7 +161,7 @@ struct commit_graft *read_graft_line(char *buf, int len)
161
if (buf[len-1] == '\n')
162
buf[--len] = 0;
163
if (buf[0] == '#')
164
- return 0;
+ return NULL;
165
if ((len + 1) % 41) {
166
bad_graft_data:
167
error("bad graft data: %s", buf);
@@ -192,6 +192,8 @@ int read_graft_file(const char *graft_file)
192
/* The format is just "Commit Parent1 Parent2 ...\n" */
193
int len = strlen(buf);
194
struct commit_graft *graft = read_graft_line(buf, len);
195
+ if (!graft)
196
+ continue;
197
if (register_commit_graft(graft, 1))
198
error("duplicate graft data: %s", buf);
199
}
0 commit comments