diff --git a/core/commands/add.go b/core/commands/add.go index 83534493eac..ed2a5f866d1 100644 --- a/core/commands/add.go +++ b/core/commands/add.go @@ -133,10 +133,10 @@ only-hash, and progress/status related flags) will change the final hash. cmds.BoolOption(wrapOptionName, "w", "Wrap files with a directory object."), cmds.StringOption(chunkerOptionName, "s", "Chunking algorithm, size-[bytes], rabin-[min]-[avg]-[max] or buzhash").WithDefault("size-262144"), cmds.BoolOption(pinOptionName, "Pin this object when adding.").WithDefault(true), - cmds.BoolOption(rawLeavesOptionName, "Use raw blocks for leaf nodes."), + cmds.BoolOption(rawLeavesOptionName, "Use raw blocks for leaf nodes. (enabled for CIDv1)"), cmds.BoolOption(noCopyOptionName, "Add the file using filestore. Implies raw-leaves. (experimental)"), cmds.BoolOption(fstoreCacheOptionName, "Check the filestore for pre-existing blocks. (experimental)"), - cmds.IntOption(cidVersionOptionName, "CID version. Defaults to 0 unless an option that depends on CIDv1 is passed. Passing version 1 will cause the raw-leaves option to default to true."), + cmds.IntOption(cidVersionOptionName, "CID version (default is 1)"), cmds.StringOption(hashOptionName, "Hash function to use. Implies CIDv1 if not sha2-256. (experimental)").WithDefault("sha2-256"), cmds.BoolOption(inlineOptionName, "Inline small blocks into CIDs. (experimental)"), cmds.IntOption(inlineLimitOptionName, "Maximum block size to inline. (experimental)").WithDefault(32), @@ -217,6 +217,8 @@ only-hash, and progress/status related flags) will change the final hash. if cidVerSet { opts = append(opts, options.Unixfs.CidVersion(cidVer)) + } else { + opts = append(opts, options.Unixfs.CidVersion(1)) } if rbset {