Re: [PATCH 10/13] rev-list: add list-objects filtering support

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, Oct 24, 2017 at 11:53 AM, Jeff Hostetler <git@xxxxxxxxxxxxxxxxx> wrote:
>  static void finish_object(struct object *obj, const char *name, void *cb_data)
>  {
>         struct rev_list_info *info = cb_data;
> -       if (obj->type == OBJ_BLOB && !has_object_file(&obj->oid))
> +       if (obj->type == OBJ_BLOB && !has_object_file(&obj->oid)) {
> +               if (arg_print_missing) {
> +                       list_objects_filter_map_insert(
> +                               &missing_objects, &obj->oid, name, obj->type);
> +                       return;
> +               }
> +
> +               /*
> +                * Relax consistency checks when we expect missing
> +                * objects because of partial-clone or a previous
> +                * partial-fetch.
> +                *
> +                * Note that this is independent of any filtering that
> +                * we are doing in this run.
> +                */
> +               if (is_partial_clone_registered())
> +                       return;
> +
>                 die("missing blob object '%s'", oid_to_hex(&obj->oid));

I'm fine with arg_print_missing suppressing lazy fetching (when I
rebase my patches on this, I'll have to ensure that fetch_if_missing
is set to 0 if arg_print_missing is true), but I think that the
behavior when arg_print_missing is false should be the opposite - we
should let has_object_file() perform the lazy fetching, and die if it
returns false (that is, if the fetching failed).

> +       }
>         if (info->revs->verify_objects && !obj->parsed && obj->type != OBJ_COMMIT)
>                 parse_object(&obj->oid);
>  }



[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux