···875875 keepset[c] = true
876876 oblk, err := bs.Get(ctx, c)
877877 if err != nil {
878878- return nil, err
878878+ return nil, fmt.Errorf("get failed in new tree: %w", err)
879879 }
880880881881 if err := cbg.ScanForLinks(bytes.NewReader(oblk.RawData()), func(lnk cid.Cid) {
···901901902902 oblk, err := bs.Get(ctx, c)
903903 if err != nil {
904904- return nil, err
904904+ return nil, fmt.Errorf("get failed in old tree: %w", err)
905905 }
906906907907 if err := cbg.ScanForLinks(bytes.NewReader(oblk.RawData()), func(lnk cid.Cid) {
+9
cmd/gosky/sync.go
···2727 Name: "get-repo",
2828 Usage: "download repo from account's PDS to local file (or '-' for stdout). for hex combine with 'xxd -ps -u -c 0'",
2929 ArgsUsage: `<at-identifier> [<car-file-path>]`,
3030+ Flags: []cli.Flag{
3131+ &cli.StringFlag{
3232+ Name: "host",
3333+ },
3434+ },
3035 Action: func(cctx *cli.Context) error {
3136 ctx := context.Background()
3237 arg := cctx.Args().First()
···5560 xrpcc.Host = ident.PDSEndpoint()
5661 if xrpcc.Host == "" {
5762 return fmt.Errorf("no PDS endpoint for identity")
6363+ }
6464+6565+ if h := cctx.String("host"); h != "" {
6666+ xrpcc.Host = h
5867 }
59686069 log.Infof("downloading from %s to: %s", xrpcc.Host, carPath)
+6
repomgr/repomgr.go
···769769 return err
770770 }
771771772772+ if rev == nil {
773773+ // if 'rev' is nil, this implies a fresh sync.
774774+ // in this case, ignore any existing blocks we have and treat this like a clean import.
775775+ curhead = cid.Undef
776776+ }
777777+772778 if rev != nil && *rev != currev {
773779 // TODO: we could probably just deal with this
774780 return fmt.Errorf("ImportNewRepo called with incorrect base")