X-Git-Url: http://git.ipfire.org/?a=blobdiff_plain;f=list-objects-filter-options.c;h=256bcfbdfe666db068599baeb8aae4c09a3ac8fb;hb=417056578a76f87f8175c7b315e35ca2fb92a0aa;hp=4d88bfe64ad230b4055a77b79432ae2db8af87f6;hpb=026428c35eb7e4018de3707a08a7dc3d23a69712;p=thirdparty%2Fgit.git diff --git a/list-objects-filter-options.c b/list-objects-filter-options.c index 4d88bfe64a..256bcfbdfe 100644 --- a/list-objects-filter-options.c +++ b/list-objects-filter-options.c @@ -62,17 +62,7 @@ static int gently_parse_list_objects_filter( return 0; } else if (skip_prefix(arg, "sparse:oid=", &v0)) { - struct object_context oc; - struct object_id sparse_oid; - - /* - * Try to parse into an OID for the current - * command, but DO NOT complain if we don't have the blob or - * ref locally. - */ - if (!get_oid_with_context(the_repository, v0, GET_OID_BLOB, - &sparse_oid, &oc)) - filter_options->sparse_oid_value = oiddup(&sparse_oid); + filter_options->sparse_oid_name = xstrdup(v0); filter_options->choice = LOFC_SPARSE_OID; return 0; @@ -320,7 +310,7 @@ void list_objects_filter_release( if (!filter_options) return; string_list_clear(&filter_options->filter_spec, /*free_util=*/0); - free(filter_options->sparse_oid_value); + free(filter_options->sparse_oid_name); for (sub = 0; sub < filter_options->sub_nr; sub++) list_objects_filter_release(&filter_options->sub[sub]); free(filter_options->sub);