提交 4f437312 编写于 作者: N Nguyễn Thái Ngọc Duy 提交者: Junio C Hamano

files-backend.c: delete dead code in files_ref_iterator_begin()

It's not in the diff context, but files_downcast() is called before this
check. If "refs" is NULL, we would have segfaulted before reaching the
check here. And we should never see NULL refs in backend code (frontend
should have caught it).
Signed-off-by: NNguyễn Thái Ngọc Duy <pclouds@gmail.com>
Signed-off-by: NJunio C Hamano <gitster@pobox.com>
上级 11f8457f
......@@ -1897,9 +1897,6 @@ static struct ref_iterator *files_ref_iterator_begin(
struct files_ref_iterator *iter;
struct ref_iterator *ref_iterator;
if (!refs)
return empty_ref_iterator_begin();
if (ref_paranoia < 0)
ref_paranoia = git_env_bool("GIT_REF_PARANOIA", 0);
if (ref_paranoia)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册