sha1_object_info(): be consistent with read_sha1_file()