Re: [PATCH 9/9] clone: run check_everything_connected

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

 



On Tue, Mar 26, 2013 at 07:53:42AM +0700, Nguyen Thai Ngoc Duy wrote:

> On Tue, Mar 26, 2013 at 3:26 AM, Jeff King <peff@xxxxxxxx> wrote:
> >  static void update_remote_refs(const struct ref *refs,
> >                                const struct ref *mapped_refs,
> >                                const struct ref *remote_head_points_at,
> >                                const char *branch_top,
> >                                const char *msg)
> >  {
> > +       const struct ref *rm = mapped_refs;
> > +
> > +       if (check_everything_connected(iterate_ref_map, 0, &rm))
> > +               die(_("remote did not send all necessary objects"));
> > +
> >         if (refs) {
> >                 write_remote_refs(mapped_refs);
> >                 if (option_single_branch)
> 
> Maybe move this after checkout, so that I can switch terminal and
> start working while it's verifying? And maybe an option not to
> check_everything_connected, instead print a big fat warning telling
> the user to fsck later?

I tried to follow the fetch process of not installing the refs until we
had verified that the objects were reasonable. It probably doesn't
matter that much for clone, since you would not have simultaneous users
expecting the repository to be in a reasonable state until after clone
completes, though.

We also would have to tweak check_everything_connected, which does
something like "--not --all" to avoid rechecking objects we already
have. But that is not too hard to do.

-Peff
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[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]