diff --git a/core/commands/add.go b/core/commands/add.go index 3087c0e928c..bdf24a6e144 100644 --- a/core/commands/add.go +++ b/core/commands/add.go @@ -5,14 +5,16 @@ import ( "fmt" "io" "os" + "path" "strings" "github.com/ipfs/go-ipfs/core/commands/cmdenv" cmdkit "github.com/ipfs/go-ipfs-cmdkit" cmds "github.com/ipfs/go-ipfs-cmds" + "github.com/ipfs/go-ipfs-files" coreiface "github.com/ipfs/interface-go-ipfs-core" - options "github.com/ipfs/interface-go-ipfs-core/options" + "github.com/ipfs/interface-go-ipfs-core/options" mh "github.com/multiformats/go-multihash" pb "gopkg.in/cheggaaa/pb.v1" ) @@ -34,8 +36,6 @@ const ( progressOptionName = "progress" trickleOptionName = "trickle" wrapOptionName = "wrap-with-directory" - stdinPathName = "stdin-name" - hiddenOptionName = "hidden" onlyHashOptionName = "only-hash" chunkerOptionName = "chunker" pinOptionName = "pin" @@ -112,6 +112,8 @@ You can now check what blocks have been created by: Options: []cmdkit.Option{ cmds.OptionRecursivePath, // a builtin option that allows recursive paths (-r, --recursive) cmds.OptionDerefArgs, // a builtin option that resolves passed in filesystem links (--dereference-args) + cmds.OptionStdinName, // a builtin option that optionally allows wrapping stdin into a named file + cmds.OptionHidden, cmdkit.BoolOption(quietOptionName, "q", "Write minimal output."), cmdkit.BoolOption(quieterOptionName, "Q", "Write only final hash."), cmdkit.BoolOption(silentOptionName, "Write no output."), @@ -119,8 +121,6 @@ You can now check what blocks have been created by: cmdkit.BoolOption(trickleOptionName, "t", "Use trickle-dag format for dag generation."), cmdkit.BoolOption(onlyHashOptionName, "n", "Only chunk and hash - do not write to disk."), cmdkit.BoolOption(wrapOptionName, "w", "Wrap files with a directory object."), - cmdkit.StringOption(stdinPathName, "Assign a name if the file source is stdin."), - cmdkit.BoolOption(hiddenOptionName, "H", "Include files that are hidden. Only takes effect on recursive add."), cmdkit.StringOption(chunkerOptionName, "s", "Chunking algorithm, size-[bytes] or rabin-[min]-[avg]-[max]").WithDefault("size-262144"), cmdkit.BoolOption(pinOptionName, "Pin this object when adding.").WithDefault(true), cmdkit.BoolOption(rawLeavesOptionName, "Use raw blocks for leaf nodes. (experimental)"), @@ -160,7 +160,6 @@ You can now check what blocks have been created by: trickle, _ := req.Options[trickleOptionName].(bool) wrap, _ := req.Options[wrapOptionName].(bool) hash, _ := req.Options[onlyHashOptionName].(bool) - hidden, _ := req.Options[hiddenOptionName].(bool) silent, _ := req.Options[silentOptionName].(bool) chunker, _ := req.Options[chunkerOptionName].(string) dopin, _ := req.Options[pinOptionName].(bool) @@ -171,7 +170,6 @@ You can now check what blocks have been created by: hashFunStr, _ := req.Options[hashOptionName].(string) inline, _ := req.Options[inlineOptionName].(bool) inlineLimit, _ := req.Options[inlineLimitOptionName].(int) - pathName, _ := req.Options[stdinPathName].(string) hashFunCode, ok := mh.Names[strings.ToLower(hashFunStr)] if !ok { @@ -185,6 +183,23 @@ You can now check what blocks have been created by: events := make(chan interface{}, adderOutChanSize) + var toadd files.Node = req.Files + name := "" + if !wrap { + it := req.Files.Entries() + if !it.Next() { + err := it.Err() + if err == nil { + return fmt.Errorf("expected a file argument") + } + return err + } + + toadd = it.Node() + name = it.Name() + } + _, dir := toadd.(files.Directory) + opts := []options.UnixfsAddOption{ options.Unixfs.Hash(hashFunCode), @@ -198,10 +213,6 @@ You can now check what blocks have been created by: options.Unixfs.FsCache(fscache), options.Unixfs.Nocopy(nocopy), - options.Unixfs.Wrap(wrap), - options.Unixfs.Hidden(hidden), - options.Unixfs.StdinName(pathName), - options.Unixfs.Progress(progress), options.Unixfs.Silent(silent), options.Unixfs.Events(events), @@ -224,7 +235,7 @@ You can now check what blocks have been created by: var err error defer func() { errCh <- err }() defer close(events) - _, err = api.Unixfs().Add(req.Context, req.Files, opts...) + _, err = api.Unixfs().Add(req.Context, toadd, opts...) }() for event := range events { @@ -238,6 +249,12 @@ You can now check what blocks have been created by: h = enc.Encode(output.Path.Cid()) } + if !dir && name != "" { + output.Name = name + } else { + output.Name = path.Join(name, output.Name) + } + res.Emit(&AddEvent{ Name: output.Name, Hash: h, diff --git a/core/coreapi/unixfs.go b/core/coreapi/unixfs.go index c840280bbca..ce0ecf8fe82 100644 --- a/core/coreapi/unixfs.go +++ b/core/coreapi/unixfs.go @@ -87,13 +87,11 @@ func (api *UnixfsAPI) Add(ctx context.Context, files files.Node, opts ...options fileAdder.Out = settings.Events fileAdder.Progress = settings.Progress } - fileAdder.Hidden = settings.Hidden fileAdder.Wrap = settings.Wrap fileAdder.Pin = settings.Pin && !settings.OnlyHash fileAdder.Silent = settings.Silent fileAdder.RawLeaves = settings.RawLeaves fileAdder.NoCopy = settings.NoCopy - fileAdder.Name = settings.StdinName fileAdder.CidBuilder = prefix switch settings.Layout { diff --git a/core/corehttp/gateway_test.go b/core/corehttp/gateway_test.go index a2a77d1c526..b44f9ef4f3e 100644 --- a/core/corehttp/gateway_test.go +++ b/core/corehttp/gateway_test.go @@ -22,7 +22,6 @@ import ( files "github.com/ipfs/go-ipfs-files" path "github.com/ipfs/go-path" iface "github.com/ipfs/interface-go-ipfs-core" - "github.com/ipfs/interface-go-ipfs-core/options" nsopts "github.com/ipfs/interface-go-ipfs-core/options/namesys" ci "github.com/libp2p/go-libp2p-crypto" id "github.com/libp2p/go-libp2p/p2p/protocol/identify" @@ -253,7 +252,7 @@ func TestIPNSHostnameRedirect(t *testing.T) { }), }) - k, err := api.Unixfs().Add(ctx, f1, options.Unixfs.Wrap(true)) + k, err := api.Unixfs().Add(ctx, f1) if err != nil { t.Fatal(err) } @@ -346,7 +345,7 @@ func TestIPNSHostnameBacklinks(t *testing.T) { }) // create /ipns/example.net/foo/ - k, err := api.Unixfs().Add(ctx, f1, options.Unixfs.Wrap(true)) + k, err := api.Unixfs().Add(ctx, f1) if err != nil { t.Fatal(err) } diff --git a/core/coreunix/add.go b/core/coreunix/add.go index ae84495f989..4fc749c067a 100644 --- a/core/coreunix/add.go +++ b/core/coreunix/add.go @@ -5,7 +5,6 @@ import ( "errors" "fmt" "io" - "os" gopath "path" "strconv" @@ -50,7 +49,6 @@ func NewAdder(ctx context.Context, p pin.Pinner, bs bstore.GCLocker, ds ipld.DAG dagService: ds, bufferedDS: bufferedDS, Progress: false, - Hidden: true, Pin: true, Trickle: false, Wrap: false, @@ -67,13 +65,11 @@ type Adder struct { bufferedDS *ipld.BufferedDAG Out chan<- interface{} Progress bool - Hidden bool Pin bool Trickle bool RawLeaves bool Silent bool Wrap bool - Name string NoCopy bool Chunker string root ipld.Node @@ -132,8 +128,8 @@ func (adder *Adder) add(reader io.Reader) (ipld.Node, error) { return balanced.Layout(db) } -// RootNode returns the root node of the Added. -func (adder *Adder) RootNode() (ipld.Node, error) { +// RootNode returns the mfs root node +func (adder *Adder) curRootNode() (ipld.Node, error) { // for memoizing if adder.root != nil { return adder.root, nil @@ -164,18 +160,14 @@ func (adder *Adder) RootNode() (ipld.Node, error) { // Recursively pins the root node of Adder and // writes the pin state to the backing datastore. -func (adder *Adder) PinRoot() error { - root, err := adder.RootNode() - if err != nil { - return err - } +func (adder *Adder) PinRoot(root ipld.Node) error { if !adder.Pin { return nil } rnk := root.Cid() - err = adder.dagService.Add(adder.ctx, root) + err := adder.dagService.Add(adder.ctx, root) if err != nil { return err } @@ -192,53 +184,6 @@ func (adder *Adder) PinRoot() error { return adder.pinning.Flush() } -// Finalize flushes the mfs root directory and returns the mfs root node. -func (adder *Adder) Finalize() (ipld.Node, error) { - mr, err := adder.mfsRoot() - if err != nil { - return nil, err - } - var root mfs.FSNode - rootdir := mr.GetDirectory() - root = rootdir - - err = root.Flush() - if err != nil { - return nil, err - } - - var name string - if !adder.Wrap { - children, err := rootdir.ListNames(adder.ctx) - if err != nil { - return nil, err - } - - if len(children) == 0 { - return nil, fmt.Errorf("expected at least one child dir, got none") - } - - // Replace root with the first child - name = children[0] - root, err = rootdir.Child(name) - if err != nil { - return nil, err - } - } - - err = adder.outputDirs(name, root) - if err != nil { - return nil, err - } - - err = mr.Close() - if err != nil { - return nil, err - } - - return root.GetNode() -} - func (adder *Adder) outputDirs(path string, fsn mfs.FSNode) error { switch fsn := fsn.(type) { case *mfs.File: @@ -321,30 +266,77 @@ func (adder *Adder) AddAllAndPin(file files.Node) (ipld.Node, error) { } }() - switch tf := file.(type) { - case files.Directory: - // Iterate over each top-level file and add individually. Otherwise the - // single files.File f is treated as a directory, affecting hidden file - // semantics. - it := tf.Entries() - for it.Next() { - if err := adder.addFileNode(it.Name(), it.Node()); err != nil { - return nil, err - } + if err := adder.addFileNode("", file, true); err != nil { + return nil, err + } + + // get root + mr, err := adder.mfsRoot() + if err != nil { + return nil, err + } + var root mfs.FSNode + rootdir := mr.GetDirectory() + root = rootdir + + err = root.Flush() + if err != nil { + return nil, err + } + + // if adding a file without wrapping, swap the root to it (when adding a + // directory, mfs root is the directory) + _, dir := file.(files.Directory) + var name string + if !adder.Wrap && !dir { + children, err := rootdir.ListNames(adder.ctx) + if err != nil { + return nil, err + } + + if len(children) == 0 { + return nil, fmt.Errorf("expected at least one child dir, got none") } - if it.Err() != nil { - return nil, it.Err() + + // Replace root with the first child + name = children[0] + root, err = rootdir.Child(name) + if err != nil { + return nil, err } - break - default: - if err := adder.addFileNode("", file); err != nil { + } + + err = mr.Close() + if err != nil { + return nil, err + } + + nd, err := root.GetNode() + if err != nil { + return nil, err + } + + // when adding wrapped directory, manually wrap here + if adder.Wrap && dir { + name = nd.Cid().String() + + end := unixfs.EmptyDirNode() + if err := end.AddNodeLink(nd.Cid().String(), nd); err != nil { + return nil, err + } + nd = end + + if err := adder.dagService.Add(adder.ctx, end); err != nil { + return nil, err + } + + if err := outputDagnode(adder.Out, "", nd); err != nil { return nil, err } - break } - // copy intermediary nodes from editor to our actual dagservice - nd, err := adder.Finalize() + // output directory events + err = adder.outputDirs(name, root) if err != nil { return nil, err } @@ -352,11 +344,14 @@ func (adder *Adder) AddAllAndPin(file files.Node) (ipld.Node, error) { if !adder.Pin { return nd, nil } - return nd, adder.PinRoot() + return nd, adder.PinRoot(nd) } -func (adder *Adder) addFileNode(path string, file files.Node) error { - defer file.Close() +func (adder *Adder) addFileNode(path string, file files.Node, toplevel bool) error { + if !toplevel { + defer file.Close() + } + err := adder.maybePauseForGC() if err != nil { return err @@ -378,7 +373,7 @@ func (adder *Adder) addFileNode(path string, file files.Node) error { switch f := file.(type) { case files.Directory: - return adder.addDir(path, f) + return adder.addDir(path, f, toplevel) case *files.Symlink: return adder.addSymlink(path, f) case files.File: @@ -422,43 +417,32 @@ func (adder *Adder) addFile(path string, file files.File) error { return err } - addFileInfo, ok := file.(files.FileInfo) - if ok { - if addFileInfo.AbsPath() == os.Stdin.Name() && adder.Name != "" { - path = adder.Name - adder.Name = "" - } - } // patch it into the root return adder.addNode(dagnode, path) } -func (adder *Adder) addDir(path string, dir files.Directory) error { +func (adder *Adder) addDir(path string, dir files.Directory, toplevel bool) error { log.Infof("adding directory: %s", path) - mr, err := adder.mfsRoot() - if err != nil { - return err - } - err = mfs.Mkdir(mr, path, mfs.MkdirOpts{ - Mkparents: true, - Flush: false, - CidBuilder: adder.CidBuilder, - }) - if err != nil { - return err + if !(toplevel && path == "") { + mr, err := adder.mfsRoot() + if err != nil { + return err + } + err = mfs.Mkdir(mr, path, mfs.MkdirOpts{ + Mkparents: true, + Flush: false, + CidBuilder: adder.CidBuilder, + }) + if err != nil { + return err + } } it := dir.Entries() for it.Next() { fpath := gopath.Join(path, it.Name()) - - // Skip hidden files when adding recursively, unless Hidden is enabled. - if files.IsHidden(fpath, it.Node()) && !adder.Hidden { - log.Infof("%s is hidden, skipping", fpath) - continue - } - err = adder.addFileNode(fpath, it.Node()) + err := adder.addFileNode(fpath, it.Node(), false) if err != nil { return err } @@ -469,7 +453,12 @@ func (adder *Adder) addDir(path string, dir files.Directory) error { func (adder *Adder) maybePauseForGC() error { if adder.unlocker != nil && adder.gcLocker.GCRequested() { - err := adder.PinRoot() + rn, err := adder.curRootNode() + if err != nil { + return err + } + + err = adder.PinRoot(rn) if err != nil { return err } diff --git a/go.mod b/go.mod index fec9402d919..232f0b6eb7a 100644 --- a/go.mod +++ b/go.mod @@ -33,12 +33,12 @@ require ( github.com/ipfs/go-ipfs-blocksutil v0.0.1 github.com/ipfs/go-ipfs-chunker v0.0.1 github.com/ipfs/go-ipfs-cmdkit v0.0.1 - github.com/ipfs/go-ipfs-cmds v0.0.2 + github.com/ipfs/go-ipfs-cmds v0.0.4 github.com/ipfs/go-ipfs-config v0.0.1 github.com/ipfs/go-ipfs-ds-help v0.0.1 github.com/ipfs/go-ipfs-exchange-interface v0.0.1 github.com/ipfs/go-ipfs-exchange-offline v0.0.1 - github.com/ipfs/go-ipfs-files v0.0.1 + github.com/ipfs/go-ipfs-files v0.0.2 github.com/ipfs/go-ipfs-posinfo v0.0.1 github.com/ipfs/go-ipfs-routing v0.0.1 github.com/ipfs/go-ipfs-util v0.0.1 @@ -55,7 +55,7 @@ require ( github.com/ipfs/go-unixfs v0.0.3 github.com/ipfs/go-verifcid v0.0.1 github.com/ipfs/hang-fds v0.0.1 - github.com/ipfs/interface-go-ipfs-core v0.0.3 + github.com/ipfs/interface-go-ipfs-core v0.0.4 github.com/ipfs/iptb v1.4.0 github.com/ipfs/iptb-plugins v0.0.2 github.com/jbenet/go-is-domain v0.0.0-20160119110217-ba9815c809e0 @@ -109,6 +109,7 @@ require ( github.com/whyrusleeping/multiaddr-filter v0.0.0-20160516205228-e903e4adabd7 github.com/whyrusleeping/tar-utils v0.0.0-20180509141711-8c6c8ba81d5c golang.org/x/sys v0.0.0-20190302025703-b6889370fb10 + golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e // indirect gopkg.in/airbrake/gobrake.v2 v2.0.9 // indirect gopkg.in/cheggaaa/pb.v1 v1.0.28 gopkg.in/gemnasium/logrus-airbrake-hook.v2 v2.1.2 // indirect diff --git a/go.sum b/go.sum index d141a83ce48..2d16b96c209 100644 --- a/go.sum +++ b/go.sum @@ -37,6 +37,7 @@ github.com/cskr/pubsub v1.0.2/go.mod h1:/8MzYXk/NJAz782G8RPkFzXTZVu63VotefPnR9TI github.com/davecgh/go-spew v0.0.0-20171005155431-ecdeabc65495/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/davecgh/go-spew v1.1.0 h1:ZDRjVQ15GmhC3fiQ8ni8+OwkZQO4DARzQgrnXU1Liz8= github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= +github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/davidlazar/go-crypto v0.0.0-20170701192655-dcfb0a7ac018 h1:6xT9KW8zLC5IlbaIF5Q7JNieBoACT7iW0YTxQHR0in0= github.com/davidlazar/go-crypto v0.0.0-20170701192655-dcfb0a7ac018/go.mod h1:rQYf4tfk5sSwFsnDg3qYaBxSjsD9S8+59vW0dKUgme4= @@ -95,12 +96,8 @@ github.com/hashicorp/golang-lru v0.5.1 h1:0hERBMJE1eitiLkihrMvRVBYAkpHzc/J3QdDN+ github.com/hashicorp/golang-lru v0.5.1/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8= github.com/hpcloud/tail v1.0.0 h1:nfCOvKYfkgYP8hkirhJocXT2+zOD8yUNjXaWfTlyFKI= github.com/hpcloud/tail v1.0.0/go.mod h1:ab1qPbhIpdTxEkNHXyeSf5vhxWSCs/tWer42PpOxQnU= -github.com/hsanjuan/go-libp2p-gostream v0.0.30 h1:8vNjVW55G0i2fw17+Pl+76UG3IQd68jJOiCfTW5JOCQ= -github.com/hsanjuan/go-libp2p-gostream v0.0.30/go.mod h1:jfrdMwo5DXvVXruRjg33ELnc9loyQrLhonOrDZnka2M= github.com/hsanjuan/go-libp2p-gostream v0.0.31 h1:9dIgHQPR0VWxhOyTZrbgLzTx0xvZ5rTpmhG9huGEPjY= github.com/hsanjuan/go-libp2p-gostream v0.0.31/go.mod h1:cWvV5/NQ5XWi0eQZnX/svsAk6NLc4U26pItvj0eDeRk= -github.com/hsanjuan/go-libp2p-http v0.0.1 h1:BIT66H0+XwuHAqlTP6EUBZ27MwZwBy1Cxx0gEPf7q2Y= -github.com/hsanjuan/go-libp2p-http v0.0.1/go.mod h1:x7UoBuLChSOHvfs2TivH8j7vDy2EQAGU6QQYdRlkbm0= github.com/hsanjuan/go-libp2p-http v0.0.2 h1:hviJbUD3h1Ez2FYTUdnRjrkAzn/9i2V/cLZpFPgnuP8= github.com/hsanjuan/go-libp2p-http v0.0.2/go.mod h1:MynY94gfOZxrw/0lVF4o7vbV2Zr84IC8sLBXmj8F5IE= github.com/huin/goupnp v0.0.0-20180415215157-1395d1447324 h1:PV190X5/DzQ/tbFFG5YpT5mH6q+cHlfgqI5JuRnH9oE= @@ -111,8 +108,6 @@ github.com/ipfs/dir-index-html v1.0.3 h1:cKdOjJBKJgewgcv97zOlqsNOle52N91d3nAkbQa github.com/ipfs/dir-index-html v1.0.3/go.mod h1:TG9zbaH/+4MnkGel0xF4SLNhk+YZvBNo6jjBkO/LaWc= github.com/ipfs/go-bitswap v0.0.1 h1:Xx1ma7TWy9ISOx5zFq5YVQyrTHzUP4GkRPMsZokHxAg= github.com/ipfs/go-bitswap v0.0.1/go.mod h1:z+tP3h+HTJ810n1R5yMy2ccKFffJ2F6Vqm/5Bf7vs2c= -github.com/ipfs/go-bitswap v0.0.2 h1:zlYqGWXAGuroihkjc7eAKqepwlJOcGm3ZwmFWnPUKks= -github.com/ipfs/go-bitswap v0.0.2/go.mod h1:hBpOzPZHLBNPmuOkL/RXDD0tY8e8xyaL6yBuGBWaIso= github.com/ipfs/go-bitswap v0.0.3 h1:uFcSI9dkjUn67S7IM60vr2wA27aAvn8o9xYjaQCug3o= github.com/ipfs/go-bitswap v0.0.3/go.mod h1:jadAZYsP/tcRMl47ZhFxhaNuDQoXawT8iHMg+iFoQbg= github.com/ipfs/go-block-format v0.0.1/go.mod h1:DK/YYcsSUIVAFNwo/KZCdIIbpN0ROH/baNLgayt4pFc= @@ -120,8 +115,6 @@ github.com/ipfs/go-block-format v0.0.2 h1:qPDvcP19izTjU8rgo6p7gTXZlkMkF5bz5G3fqI github.com/ipfs/go-block-format v0.0.2/go.mod h1:AWR46JfpcObNfg3ok2JHDUfdiHRgWhJgCQF+KIgOPJY= github.com/ipfs/go-blockservice v0.0.1 h1:l6g1hwYDV6vb4bAvTqia6Cvo+zLMOPKel/n0zUX48bc= github.com/ipfs/go-blockservice v0.0.1/go.mod h1:2Ao89U7jV1KIqqNk5EdhSTBG/Pgc1vMFr0bhkx376j4= -github.com/ipfs/go-blockservice v0.0.2 h1:ZiKTWdZAPifdWhjjO7HjAF8grUVE86IPzcUtGCTYw4w= -github.com/ipfs/go-blockservice v0.0.2/go.mod h1:2Ao89U7jV1KIqqNk5EdhSTBG/Pgc1vMFr0bhkx376j4= github.com/ipfs/go-blockservice v0.0.3 h1:40OvwrxeudTAlUGUAKNYnNPcwQeLtXedjzTWecnUinQ= github.com/ipfs/go-blockservice v0.0.3/go.mod h1:/NNihwTi6V2Yr6g8wBI+BSwPuURpBRMtYNGrlxZ8KuI= github.com/ipfs/go-cid v0.0.1 h1:GBjWPktLnNyX0JiQCNFpUuUSoMw5KMyqrsejHYlILBE= @@ -152,8 +145,10 @@ github.com/ipfs/go-ipfs-chunker v0.0.1 h1:cHUUxKFQ99pozdahi+uSC/3Y6HeRpi9oTeUHbE github.com/ipfs/go-ipfs-chunker v0.0.1/go.mod h1:tWewYK0we3+rMbOh7pPFGDyypCtvGcBFymgY4rSDLAw= github.com/ipfs/go-ipfs-cmdkit v0.0.1 h1:X6YXEAjUljTzevE6DPUKXSqcgf+4FXzcn5B957F5MXo= github.com/ipfs/go-ipfs-cmdkit v0.0.1/go.mod h1:9FtbMdUabcSqv/G4/8WCxSLxkZxn/aZEFrxxqnVcRbg= -github.com/ipfs/go-ipfs-cmds v0.0.2 h1:wbyUvMGAsQLz8KUeYLK+Q6vX1MStR51O3a3vsgtf/Pk= -github.com/ipfs/go-ipfs-cmds v0.0.2/go.mod h1:k7I8PptE2kCJchR3ta546LRyxl4/uBYbLQHOJM0sUQ8= +github.com/ipfs/go-ipfs-cmds v0.0.3 h1:QvNUE8lslNQghxXf6vzV1ZoMQCDDAtKG8f2oINiRew4= +github.com/ipfs/go-ipfs-cmds v0.0.3/go.mod h1:1QVgxSgenZvOMGVC/XUTC7tJxRBGPLxYvpgPpCi3DUk= +github.com/ipfs/go-ipfs-cmds v0.0.4 h1:Iq4I8irWw5TmHe/4pjSyYJLbYkkdMOgHVe8ofJmPa4k= +github.com/ipfs/go-ipfs-cmds v0.0.4/go.mod h1:1QVgxSgenZvOMGVC/XUTC7tJxRBGPLxYvpgPpCi3DUk= github.com/ipfs/go-ipfs-config v0.0.1 h1:6ED08emzI1imdsAjixFi2pEyZxTVD5ECKtCOxLBx+Uc= github.com/ipfs/go-ipfs-config v0.0.1/go.mod h1:KDbHjNyg4e6LLQSQpkgQMBz6Jf4LXiWAcmnkcwmH0DU= github.com/ipfs/go-ipfs-delay v0.0.0-20181109222059-70721b86a9a8/go.mod h1:8SP1YXK1M1kXuc4KJZINY3TQQ03J2rwBG9QfXmbRPrw= @@ -167,6 +162,8 @@ github.com/ipfs/go-ipfs-exchange-offline v0.0.1 h1:P56jYKZF7lDDOLx5SotVh5KFxoY6C github.com/ipfs/go-ipfs-exchange-offline v0.0.1/go.mod h1:WhHSFCVYX36H/anEKQboAzpUws3x7UeEGkzQc3iNkM0= github.com/ipfs/go-ipfs-files v0.0.1 h1:OroTsI58plHGX70HPLKy6LQhPR3HZJ5ip61fYlo6POM= github.com/ipfs/go-ipfs-files v0.0.1/go.mod h1:INEFm0LL2LWXBhNJ2PMIIb2w45hpXgPjNoE7yA8Y1d4= +github.com/ipfs/go-ipfs-files v0.0.2 h1:fEEjF4H+1t8SFOHqUGp0KqcwgIRlbD2bu8CAS2sIggE= +github.com/ipfs/go-ipfs-files v0.0.2/go.mod h1:INEFm0LL2LWXBhNJ2PMIIb2w45hpXgPjNoE7yA8Y1d4= github.com/ipfs/go-ipfs-flags v0.0.1 h1:OH5cEkJYL0QgA+bvD55TNG9ud8HA2Nqaav47b2c/UJk= github.com/ipfs/go-ipfs-flags v0.0.1/go.mod h1:RnXBb9WV53GSfTrSDVK61NLTFKvWc60n+K9EgCDh+rA= github.com/ipfs/go-ipfs-posinfo v0.0.1 h1:Esoxj+1JgSjX0+ylc0hUmJCOv6V2vFoZiETLR6OtpRs= @@ -189,44 +186,32 @@ github.com/ipfs/go-log v0.0.1 h1:9XTUN/rW64BCG1YhPK9Hoy3q8nr4gOmHHBpgFdfw6Lc= github.com/ipfs/go-log v0.0.1/go.mod h1:kL1d2/hzSpI0thNYjiKfjanbVNU+IIGA/WnNESY9leM= github.com/ipfs/go-merkledag v0.0.1 h1:HqvQsqqLvNOgItOy80Sd4T4rHvq6cXtAtrbEoWAON+I= github.com/ipfs/go-merkledag v0.0.1/go.mod h1:CRdtHMROECqaehAGeJ0Wd9TtlmWv/ta5cUnvbTnniEI= -github.com/ipfs/go-merkledag v0.0.2 h1:U3Q74RLOwpbtERjCv/MODC99qSxHBw33ZeMfiGXl7ts= -github.com/ipfs/go-merkledag v0.0.2/go.mod h1:CRdtHMROECqaehAGeJ0Wd9TtlmWv/ta5cUnvbTnniEI= github.com/ipfs/go-merkledag v0.0.3 h1:A5DlOMzqTRDVmdgkf3dzCKCFmVWH4Zqwb0cbYXUs+Ro= github.com/ipfs/go-merkledag v0.0.3/go.mod h1:Oc5kIXLHokkE1hWGMBHw+oxehkAaTOqtEb7Zbh6BhLA= github.com/ipfs/go-metrics-interface v0.0.1 h1:j+cpbjYvu4R8zbleSs36gvB7jR+wsL2fGD6n0jO4kdg= github.com/ipfs/go-metrics-interface v0.0.1/go.mod h1:6s6euYU4zowdslK0GKHmqaIZ3j/b/tL7HTWtJ4VPgWY= -github.com/ipfs/go-metrics-prometheus v0.0.1 h1:5iY3WO20WFSOErZyyYemHsbGm0V+a8YNEaOvle7kNvI= -github.com/ipfs/go-metrics-prometheus v0.0.1/go.mod h1:ELLU99AQQNi+zX6GCGm2lAgnzdSH3u5UVlCdqSXnEks= github.com/ipfs/go-metrics-prometheus v0.0.2 h1:9i2iljLg12S78OhC6UAiXi176xvQGiZaGVF1CUVdE+s= github.com/ipfs/go-metrics-prometheus v0.0.2/go.mod h1:ELLU99AQQNi+zX6GCGm2lAgnzdSH3u5UVlCdqSXnEks= -github.com/ipfs/go-mfs v0.0.3 h1:gFBlZw9DpZXaxqeto1H9uLkg+qzE8EVbCIVD2yuKUU4= -github.com/ipfs/go-mfs v0.0.3/go.mod h1:rUT0dKNWkKa1T+MobpBL2zANn7p8Y6unXANC0PV2FLk= github.com/ipfs/go-mfs v0.0.4 h1:34qX5A7mQTYTkszSKIAFr+Y7BbvwVjHW9mzHDxSUqTo= github.com/ipfs/go-mfs v0.0.4/go.mod h1:rUT0dKNWkKa1T+MobpBL2zANn7p8Y6unXANC0PV2FLk= github.com/ipfs/go-path v0.0.1 h1:6UskTq8xYVs3zVnHjXDvoCqw22dKWK1BwD1cy1cuHyc= github.com/ipfs/go-path v0.0.1/go.mod h1:ztzG4iSBN2/CJa93rtHAv/I+mpK+BGALeUoJzhclhw0= -github.com/ipfs/go-path v0.0.2 h1:Nm9g9GCo3XoSASPh2cGEW9eGPt8xh0QzA1VNO69NTMs= -github.com/ipfs/go-path v0.0.2/go.mod h1:ztzG4iSBN2/CJa93rtHAv/I+mpK+BGALeUoJzhclhw0= github.com/ipfs/go-path v0.0.3 h1:G/VFcCMXtp36JUPPyytYQ1I3UsBUBf47M//uSdTLnFg= github.com/ipfs/go-path v0.0.3/go.mod h1:zIRQUez3LuQIU25zFjC2hpBTHimWx7VK5bjZgRLbbdo= github.com/ipfs/go-todocounter v0.0.1 h1:kITWA5ZcQZfrUnDNkRn04Xzh0YFaDFXsoO2A81Eb6Lw= github.com/ipfs/go-todocounter v0.0.1/go.mod h1:l5aErvQc8qKE2r7NDMjmq5UNAvuZy0rC8BHOplkWvZ4= github.com/ipfs/go-unixfs v0.0.1 h1:CTTGqLxU5+PRkkeA+w1peStqRWFD1Kya+yZgIT4Xy1w= github.com/ipfs/go-unixfs v0.0.1/go.mod h1:ZlB83nMtxNMx4DAAE5/GixeKN1qHC+xspBksI7Q5NeI= -github.com/ipfs/go-unixfs v0.0.2 h1:2v9uYXJxlJwd7DWu2PWjRJQBZMGqLDtgp3PesvePRbE= -github.com/ipfs/go-unixfs v0.0.2/go.mod h1:ZlB83nMtxNMx4DAAE5/GixeKN1qHC+xspBksI7Q5NeI= github.com/ipfs/go-unixfs v0.0.3 h1:09koecZaoJVoYy6Wkd/vo1lyQ4AdgAe83eJylQ7gAZw= github.com/ipfs/go-unixfs v0.0.3/go.mod h1:FX/6aS/Xg95JRc6UMyiMdZeNn+N5VkD8/yfLNwKW0Ks= github.com/ipfs/go-verifcid v0.0.1 h1:m2HI7zIuR5TFyQ1b79Da5N9dnnCP1vcu2QqawmWlK2E= github.com/ipfs/go-verifcid v0.0.1/go.mod h1:5Hrva5KBeIog4A+UpqlaIU+DEstipcJYQQZc0g37pY0= github.com/ipfs/hang-fds v0.0.1 h1:KGAxiGtJPT3THVRNT6yxgpdFPeX4ZemUjENOt6NlOn4= github.com/ipfs/hang-fds v0.0.1/go.mod h1:U4JNbzwTpk/qP2Ms4VgrZ4HcgJGVosBJqMXvwe4udSY= -github.com/ipfs/interface-go-ipfs-core v0.0.3 h1:d/gYlvojMzi/uG6ixd/v4XN8ZYy3Mdil13+rLg7k7Qs= -github.com/ipfs/interface-go-ipfs-core v0.0.3/go.mod h1:CbFOGVGV8B4NCA0fAO2VVZ1Jt/ZQYE3FzTC6nLVqiAE= +github.com/ipfs/interface-go-ipfs-core v0.0.4 h1:bMsRGLkttV8Y5C1VyeSePVxEatRGwS9pRdhNkWOt+cY= +github.com/ipfs/interface-go-ipfs-core v0.0.4/go.mod h1:AOUhAfBqYu3G6Ocn+Y6rgWUWjp2zdPZiCLr8QS1TEKg= github.com/ipfs/iptb v1.4.0 h1:YFYTrCkLMRwk/35IMyC6+yjoQSHTEcNcefBStLJzgvo= github.com/ipfs/iptb v1.4.0/go.mod h1:1rzHpCYtNp87/+hTxG5TfCVn/yMY3dKnLn8tBiMfdmg= -github.com/ipfs/iptb-plugins v0.0.1 h1:aUHbQ4y8/lKIBX/FN0KXe3c4NldPLsq7VyW2CcFXbhE= -github.com/ipfs/iptb-plugins v0.0.1/go.mod h1:QUOnRv+dUB7wi+qAHha8E3nI9S3JYdsBHe/5mH0dTTI= github.com/ipfs/iptb-plugins v0.0.2 h1:JZp4h/+7f00dY4Epr8gzF+VqKITXmVGsZabvmZp7E9I= github.com/ipfs/iptb-plugins v0.0.2/go.mod h1:Vud+X6lHv5QlgVbqCPBHt91I0gPIRgmkD6/tMUsI07U= github.com/jackpal/gateway v1.0.4 h1:LS5EHkLuQ6jzaHwULi0vL+JO0mU/n4yUtK8oUjHHOlM= @@ -279,8 +264,6 @@ github.com/libp2p/go-libp2p-autonat v0.0.1 h1:d5eskFxeJ4ag1ekhMC3yLTK+z+6RTw9W1Y github.com/libp2p/go-libp2p-autonat v0.0.1/go.mod h1:fs71q5Xk+pdnKU014o2iq1RhMs9/PMaG5zXRFNnIIT4= github.com/libp2p/go-libp2p-autonat v0.0.2 h1:ilo9QPzNPf1hMkqaPG55yzvhILf5ZtijstJhcii+l3s= github.com/libp2p/go-libp2p-autonat v0.0.2/go.mod h1:fs71q5Xk+pdnKU014o2iq1RhMs9/PMaG5zXRFNnIIT4= -github.com/libp2p/go-libp2p-autonat-svc v0.0.1 h1:REDJzyVLSuWzInzvNtIVV9DL6T1hTuYWYuN7sJ4f3xs= -github.com/libp2p/go-libp2p-autonat-svc v0.0.1/go.mod h1:S/z0LPmQ36tW6sa66pnt+JXvISOXWMucLn13Si8KAJs= github.com/libp2p/go-libp2p-autonat-svc v0.0.2 h1:beAUwqt3wHWlguz1EYdG+bVOKyf5SIQpXfTSnfGoW7k= github.com/libp2p/go-libp2p-autonat-svc v0.0.2/go.mod h1:j4iMiw0d3diRm5iB0noXumtb0mPvWrM1qAyh640cp8w= github.com/libp2p/go-libp2p-blankhost v0.0.1 h1:/mZuuiwntNR8RywnCFlGHLKrKLYne+qciBpQXWqp5fk= @@ -291,7 +274,6 @@ github.com/libp2p/go-libp2p-connmgr v0.0.1 h1:9KP7UbP4a6fauLw954LhTGfovhkmMwvJsI github.com/libp2p/go-libp2p-connmgr v0.0.1/go.mod h1:eUBBlbuwBBTd/eim7KV5x0fOD2UHDjSwhzmBL6miIx8= github.com/libp2p/go-libp2p-crypto v0.0.1 h1:JNQd8CmoGTohO/akqrH16ewsqZpci2CbgYH/LmYl8gw= github.com/libp2p/go-libp2p-crypto v0.0.1/go.mod h1:yJkNyDmO341d5wwXxDUGO0LykUVT72ImHNUqh5D/dBE= -github.com/libp2p/go-libp2p-daemon v0.0.1/go.mod h1:xIEq+QccxuNBnViBKh4WEht8e76pVwa9rHkulsNGmaw= github.com/libp2p/go-libp2p-daemon v0.0.6/go.mod h1:nkhjsjSzkF+tg6iScsTTgq9m+VfyMtXNpycYG4CFvC8= github.com/libp2p/go-libp2p-discovery v0.0.1 h1:VkjCKmJQMwpDUwtA8Qc1z3TQAHJgQ5nGQ6cdN0wQXOw= github.com/libp2p/go-libp2p-discovery v0.0.1/go.mod h1:ZkkF9xIFRLA1xCc7bstYFkd80gBGK8Fc1JqGoU2i+zI= @@ -301,8 +283,6 @@ github.com/libp2p/go-libp2p-interface-connmgr v0.0.1 h1:Q9EkNSLAOF+u90L88qmE9z/f github.com/libp2p/go-libp2p-interface-connmgr v0.0.1/go.mod h1:GarlRLH0LdeWcLnYM/SaBykKFl9U5JFnbBGruAk/D5k= github.com/libp2p/go-libp2p-interface-pnet v0.0.1 h1:7GnzRrBTJHEsofi1ahFdPN9Si6skwXQE9UqR2S+Pkh8= github.com/libp2p/go-libp2p-interface-pnet v0.0.1/go.mod h1:el9jHpQAXK5dnTpKA4yfCNBZXvrzdOU75zz+C6ryp3k= -github.com/libp2p/go-libp2p-kad-dht v0.0.3 h1:0JnBP3s34DLLlbpQaHCnkXN1+lNiFadzVMV6LprUIrs= -github.com/libp2p/go-libp2p-kad-dht v0.0.3/go.mod h1:RX/LjLbKnZHDt+3ecSUbk1ycOhyVpMtIUL47rSBTVW0= github.com/libp2p/go-libp2p-kad-dht v0.0.4/go.mod h1:oaBflOQcuC8H+SVV0YN26H6AS+wcUEJyjUGV66vXuSY= github.com/libp2p/go-libp2p-kad-dht v0.0.5 h1:jTDMs438T3ng6F7Gtjau40T2vgB8y9E7sbalPjR7fdY= github.com/libp2p/go-libp2p-kad-dht v0.0.5/go.mod h1:oaBflOQcuC8H+SVV0YN26H6AS+wcUEJyjUGV66vXuSY= @@ -333,8 +313,6 @@ github.com/libp2p/go-libp2p-protocol v0.0.1 h1:+zkEmZ2yFDi5adpVE3t9dqh/N9TbpFWyw github.com/libp2p/go-libp2p-protocol v0.0.1/go.mod h1:Af9n4PiruirSDjHycM1QuiMi/1VZNHYcK8cLgFJLZ4s= github.com/libp2p/go-libp2p-pubsub v0.0.1 h1:iJWpvBDZiZOoRBGqEifu9yUHti9ptnSODHt6tgrBC6c= github.com/libp2p/go-libp2p-pubsub v0.0.1/go.mod h1:fYKlZBOF2yrJzYlgeEVFSbYWfbS+E8Zix6gMZ0A6WgE= -github.com/libp2p/go-libp2p-pubsub-router v0.0.2 h1:akEMDPfxX/yiBF7YJ7txUTAqCOMmGp/LbzPhTzGNMDY= -github.com/libp2p/go-libp2p-pubsub-router v0.0.2/go.mod h1:h5z0kyMFRu2J46tt15eEuLHKEmu1MrFghsGHqTc/iII= github.com/libp2p/go-libp2p-pubsub-router v0.0.3 h1:2EF+8nueIsA9Unpj1MxdlS9+dX29kwCxSttchMMfXsI= github.com/libp2p/go-libp2p-pubsub-router v0.0.3/go.mod h1:h5z0kyMFRu2J46tt15eEuLHKEmu1MrFghsGHqTc/iII= github.com/libp2p/go-libp2p-quic-transport v0.0.0-20190301030811-862195d91de1/go.mod h1:bw/6H57fSVn44ldP1Js6hnzpoiUm9YgBDKSv+ch+hWc= @@ -529,6 +507,8 @@ golang.org/x/text v0.3.0 h1:g61tztE5qeGQ89tm6NTjjM9VPIm088od1l6aSorWRWg= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/tools v0.0.0-20180221164845-07fd8470d635 h1:2eB4G6bDQDeP69ZXbOKC00S2Kf6TIiRS+DzfKsKeQU0= golang.org/x/tools v0.0.0-20180221164845-07fd8470d635/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= +golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e h1:FDhOuMEY4JVRztM/gsbk+IKUQ8kj74bxZrgw87eMMVc= +golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/xerrors v0.0.0-20190212162355-a5947ffaace3 h1:P6iTFmrTQqWrqLZPX1VMzCUbCRCAUXSUsSpkEOvWzJ0= golang.org/x/xerrors v0.0.0-20190212162355-a5947ffaace3/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= google.golang.org/genproto v0.0.0-20180831171423-11092d34479b/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc= diff --git a/package.json b/package.json index 66e8fd53d64..007fa57cd53 100644 --- a/package.json +++ b/package.json @@ -295,9 +295,9 @@ "version": "3.0.35" }, { - "hash": "Qmf46mr235gtyxizkKUkTH5fo62Thza2zwXR4DWC7rkoqF", + "hash": "QmdTtHdShUivytzKHVuTM7fnxn6Qv1UUX49gjxg3DzjYXz", "name": "go-ipfs-cmds", - "version": "2.0.19" + "version": "2.0.21" }, { "hash": "Qmde5VP1qUkyQXKCfmEUA7bP64V2HAptbJ7phuPp7jXWwg", @@ -513,9 +513,9 @@ }, { "author": "why", - "hash": "QmPbePTPStDY8fau3PvN1bUwy47w9K4J5EnKj5ELEgitPC", + "hash": "QmVmueix5wxmr8UWpfpcKw6F1xT7T8AS7CXQRM37BE29eX", "name": "go-unixfs", - "version": "1.3.14" + "version": "1.3.15" }, { "author": "magik6k", @@ -531,9 +531,9 @@ }, { "author": "hsanjuan", - "hash": "QmZgdW4wnFRryGicyQVcVyXFjnnTqSpbtjQjuKbucaSwq8", + "hash": "QmNQtvcJon7xo5V8DMn6MEKMFMCeXnKUNdtGC2NwGYkqk1", "name": "go-mfs", - "version": "0.1.53" + "version": "0.1.54" }, { "author": "kevina", @@ -578,9 +578,9 @@ }, { "author": "magik6k", - "hash": "QmQmhotPUzVrMEWNK3x1R5jQ5ZHWyL7tVUrmRPjrBrvyCb", + "hash": "QmRHcZ5ngUxZo8phLR3fpoqk9wA7VdGc5mhwkGSnB2nZ9F", "name": "go-ipfs-files", - "version": "2.0.6" + "version": "2.0.7" }, { "author": "whyrusleeping", @@ -608,9 +608,9 @@ }, { "author": "magik6k", - "hash": "QmaRXSjk41fN4sVxGrtNyBP5eGYYM7GydPziYEPNc5Wvcr", + "hash": "QmaLFN7mZFjJ1W9aQiPoY2WySnSqphmfZHQCPUtj2iqWVH", "name": "interface-go-ipfs-core", - "version": "0.1.14" + "version": "0.1.15" } ], "gxVersion": "0.10.0", diff --git a/test/sharness/t0080-repo.sh b/test/sharness/t0080-repo.sh index 8fe118edd2e..2882e8721ca 100755 --- a/test/sharness/t0080-repo.sh +++ b/test/sharness/t0080-repo.sh @@ -30,8 +30,7 @@ test_expect_success "'ipfs repo gc' succeeds" ' ' test_expect_success "'ipfs repo gc' looks good (patch root)" ' - PATCH_ROOT=QmQXirSbubiySKnqaFyfs5YzziXRB5JEVQVjU6xsd7innr && - grep "removed $PATCH_ROOT" gc_out_actual + grep -v "removed $HASH" gc_out_actual ' test_expect_success "'ipfs repo gc' doesnt remove file" ' @@ -113,8 +112,7 @@ test_expect_success "remove direct pin" ' test_expect_success "'ipfs repo gc' removes file" ' ipfs repo gc >actual7 && - grep "removed $HASH" actual7 && - grep "removed $PATCH_ROOT" actual7 + grep "removed $HASH" actual7 ' test_expect_success "'ipfs refs local' no longer shows file" ' @@ -123,8 +121,7 @@ test_expect_success "'ipfs refs local' no longer shows file" ' grep "QmYCvbfNbCwFR45HiNP45rwJgvatpiW38D961L5qAhUM5Y" actual8 && grep "$EMPTY_DIR" actual8 && grep "$HASH_WELCOME_DOCS" actual8 && - test_must_fail grep "$HASH" actual8 && - test_must_fail grep "$PATCH_ROOT" actual8 + test_must_fail grep "$HASH" actual8 ' test_expect_success "adding multiblock random file succeeds" ' diff --git a/test/sharness/t0175-reprovider.sh b/test/sharness/t0175-reprovider.sh index 6a30dfb442d..2df63fdfc0a 100755 --- a/test/sharness/t0175-reprovider.sh +++ b/test/sharness/t0175-reprovider.sh @@ -75,9 +75,9 @@ test_expect_success 'prepare test files' ' ' test_expect_success 'add test objects' ' - HASH_FOO=$(ipfsi 0 add -q --local --pin=false f1) && - HASH_BAR=$(ipfsi 0 add -q --local --pin=false f2) && - HASH_BAR_DIR=$(ipfsi 0 add -q --local -w f2) + HASH_FOO=$(ipfsi 0 add -q --offline --pin=false f1) && + HASH_BAR=$(ipfsi 0 add -q --offline --pin=false f2) && + HASH_BAR_DIR=$(ipfsi 0 add -q --offline -w f2) ' findprovs_empty '$HASH_FOO' @@ -104,10 +104,10 @@ test_expect_success 'prepare test files' ' ' test_expect_success 'add test objects' ' - HASH_FOO=$(ipfsi 0 add -q --local --pin=false f1) && - HASH_BAR=$(ipfsi 0 add -q --local --pin=false f2) && - HASH_BAZ=$(ipfsi 0 add -q --local f3) && - HASH_BAR_DIR=$(ipfsi 0 add -q --local -w f2 | tail -1) + HASH_FOO=$(ipfsi 0 add -q --offline --pin=false f1) && + HASH_BAR=$(ipfsi 0 add -q --offline --pin=false f2) && + HASH_BAZ=$(ipfsi 0 add -q --offline f3) && + HASH_BAR_DIR=$(ipfsi 0 add -q --offline -w f2 | tail -1) ' findprovs_empty '$HASH_FOO' @@ -142,7 +142,7 @@ test_expect_success 'Disable reprovider ticking' ' startup_cluster ${NUM_NODES} test_expect_success 'add test object' ' - HASH_0=$(echo "foo" | ipfsi 0 add -q --local) + HASH_0=$(echo "foo" | ipfsi 0 add -q --offline) ' findprovs_empty '$HASH_0'