diff-lib: convert do_diff_cache to struct object_id