simplify, id is unused

This commit is contained in:
Hiltjo Posthuma 2016-05-07 14:38:39 +02:00
parent f89c317dee
commit a7dd578de7

View file

@ -940,9 +940,8 @@ writerefs(FILE *fp)
default:
continue;
}
if (!(id = git_reference_target(r)))
goto err;
if (git_reference_peel(&obj, r, GIT_OBJ_ANY))
if (!git_reference_target(r) ||
git_reference_peel(&obj, r, GIT_OBJ_ANY))
goto err;
if (!(id = git_object_id(obj)))
goto err;