sha1_file: remove recursion in unpack_entry