summaryrefslogtreecommitdiff
path: root/refs
diff options
context:
space:
mode:
authorNguyễn Thái Ngọc Duy <pclouds@gmail.com>2017-03-26 02:42:16 (GMT)
committerJunio C Hamano <gitster@pobox.com>2017-03-27 17:23:39 (GMT)
commit4f43731268a85a095e6a0779fc94242f4694e0f4 (patch)
tree432dddb32219e34093dde2368fc052493fa9e4c7 /refs
parent11f8457fb9b787f350e176fd28ee8c01fd2b82d5 (diff)
downloadgit-4f43731268a85a095e6a0779fc94242f4694e0f4.zip
git-4f43731268a85a095e6a0779fc94242f4694e0f4.tar.gz
git-4f43731268a85a095e6a0779fc94242f4694e0f4.tar.bz2
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>
Diffstat (limited to 'refs')
-rw-r--r--refs/files-backend.c3
1 files changed, 0 insertions, 3 deletions
diff --git a/refs/files-backend.c b/refs/files-backend.c
index 42c0cc1..caeb818 100644
--- a/refs/files-backend.c
+++ b/refs/files-backend.c
@@ -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)