diff --git a/bats/1pk5col-ints.bats b/bats/1pk5col-ints.bats index 632038aa31..dbc0ebcb14 100755 --- a/bats/1pk5col-ints.bats +++ b/bats/1pk5col-ints.bats @@ -337,7 +337,13 @@ teardown() { dolt branch test run dolt checkout test [ "$status" -eq 0 ] - skip "behavior ambiguous right now. should reset test table and switch to branch per git" + # Checks out branch "test" table "test" unaltered. Matches git behavior for: + # + # git init + # git commit --allow-empty -m "create" + # touch test + # git branch test + # git checkout test } @test "make a change on a different branch, commit, and merge to master" { diff --git a/bats/config.bats b/bats/config.bats index a7bf967cae..a3cd80b868 100644 --- a/bats/config.bats +++ b/bats/config.bats @@ -41,7 +41,6 @@ teardown() { [ "$status" -eq 1 ] [[ "$output" =~ "wrong number of arguments" ]] || false run dolt config --global --add - skip "dolt config --global --add with no name value pair currently succeeds" [ "$status" -eq 1 ] [[ "$output" =~ "wrong number of arguments" ]] || false } @@ -111,9 +110,24 @@ teardown() { run dolt config --local --get test [ "$status" -eq 0 ] [ "$output" = "local" ] + # will list both global and local values in list output run dolt config --list [ "$status" -eq 0 ] - skip "list option in config does not respect local overrides" [[ "$output" =~ "test = local" ]] || false - [[ ! "$output" =~ "test = global" ]] || false + [[ "$output" =~ "test = global" ]] || false + # will get the local value explicitly + run dolt config --get --local test + [ "$status" -eq 0 ] + [[ "$output" =~ "local" ]] || false + [[ ! "$output" =~ "global" ]] || false + # will get the global value explicitly + run dolt config --get --global test + [ "$status" -eq 0 ] + [[ "$output" =~ "global" ]] || false + [[ ! "$output" =~ "local" ]] || false + # will get the local value implicitly + run dolt config --get test + [ "$status" -eq 0 ] + [[ "$output" =~ "local" ]] || false + [[ ! "$output" =~ "global" ]] || false } diff --git a/go/cmd/dolt/commands/config.go b/go/cmd/dolt/commands/config.go index 0448aa9279..94fb302de1 100644 --- a/go/cmd/dolt/commands/config.go +++ b/go/cmd/dolt/commands/config.go @@ -174,7 +174,7 @@ func getOperation(dEnv *env.DoltEnv, setCfgTypes *set.StrSet, args []string, pri } func addOperation(dEnv *env.DoltEnv, setCfgTypes *set.StrSet, args []string, usage cli.UsagePrinter) int { - if len(args)%2 != 0 { + if len(args) == 0 || len(args)%2 != 0 { cli.Println("error: wrong number of arguments") usage() return 1