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: Nguyễn Thái Ngọc Duy <pclouds@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Nguyễn Thái Ngọc Duy committed
Mar 26, 2017 at 09:42 UTC
4f43731268a85a095e6a0779fc94242f4694e0f4
1 file changed
-3
refs/files-backend.c
-3
@@ -1897,9 +1897,6 @@ static struct ref_iterator *files_ref_iterator_begin(
1897
struct files_ref_iterator *iter;
1898
struct ref_iterator *ref_iterator;
1899
1900
- if (!refs)
1901
- return empty_ref_iterator_begin();
1902
-
1900
if (ref_paranoia < 0)
1901
ref_paranoia = git_env_bool("GIT_REF_PARANOIA", 0);
1902
if (ref_paranoia)