sha1_object_info_extended: make type calculation optional