mirror of
https://github.com/dolthub/dolt.git
synced 2026-01-30 19:09:34 -06:00
go/cmd/dolt/commands: roots.go: Fix for __DOLT_{DEV,1}__.
This commit is contained in:
@@ -34,6 +34,7 @@ import (
|
||||
"github.com/dolthub/dolt/go/libraries/utils/filesys"
|
||||
"github.com/dolthub/dolt/go/store/chunks"
|
||||
"github.com/dolthub/dolt/go/store/nbs"
|
||||
"github.com/dolthub/dolt/go/store/prolly/tree"
|
||||
"github.com/dolthub/dolt/go/store/spec"
|
||||
"github.com/dolthub/dolt/go/store/types"
|
||||
)
|
||||
@@ -56,16 +57,16 @@ func (cmd RootsCmd) Hidden() bool {
|
||||
// RequiresRepo should return false if this interface is implemented, and the command does not have the requirement
|
||||
// that it be run from within a data repository directory
|
||||
func (cmd RootsCmd) RequiresRepo() bool {
|
||||
return false
|
||||
return true
|
||||
}
|
||||
|
||||
// Description returns a description of the command
|
||||
func (cmd RootsCmd) Description() string {
|
||||
return "Displays the current Dolt cli version."
|
||||
return "Displays store root values (or potential store root values) that we find in the current database."
|
||||
}
|
||||
|
||||
func (cmd RootsCmd) GatedForNBF(nbf *types.NomsBinFormat) bool {
|
||||
return types.IsFormat_DOLT_1(nbf)
|
||||
return false
|
||||
}
|
||||
|
||||
// CreateMarkdown creates a markdown file containing the helptext for the command at the given path
|
||||
@@ -152,7 +153,10 @@ func (cmd RootsCmd) processTableFile(ctx context.Context, path string, modified
|
||||
}
|
||||
} else if sm, ok := value.(types.SerialMessage); ok {
|
||||
if serial.GetFileID([]byte(sm)) == serial.StoreRootFileID {
|
||||
err := types.WriteEncodedValue(ctx, cli.OutStream, value)
|
||||
msg := serial.GetRootAsStoreRoot([]byte(sm), 0)
|
||||
ambytes := msg.AddressMapBytes()
|
||||
node := tree.NodeFromBytes(ambytes)
|
||||
err := tree.OutputAddressMapNode(cli.OutStream, node)
|
||||
if err != nil {
|
||||
return false, err
|
||||
}
|
||||
|
||||
@@ -426,7 +426,6 @@ SQL
|
||||
}
|
||||
|
||||
@test "status: roots runs even if status fails" {
|
||||
skip_nbf_dolt_1
|
||||
mv .dolt/repo_state.json .dolt/repo_state.backup
|
||||
|
||||
run dolt status
|
||||
|
||||
Reference in New Issue
Block a user