提交 8eaf7986 编写于 作者: J Junio C Hamano

git-annotate: fix -S on graft file with comments.

The graft file can contain comment lines and read_graft_line can
return NULL for such an input, which should be skipped by the
reader.
Signed-off-by: NJunio C Hamano <junkio@cox.net>
上级 a19f901d
......@@ -1407,7 +1407,8 @@ static int read_ancestry(const char *graft_file)
/* The format is just "Commit Parent1 Parent2 ...\n" */
int len = strlen(buf);
struct commit_graft *graft = read_graft_line(buf, len);
register_commit_graft(graft, 0);
if (graft)
register_commit_graft(graft, 0);
}
fclose(fp);
return 0;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册