diff --git a/go/cmd/dolt/commands/merge.go b/go/cmd/dolt/commands/merge.go index 5a8ff82a6c..ac535ffa30 100644 --- a/go/cmd/dolt/commands/merge.go +++ b/go/cmd/dolt/commands/merge.go @@ -302,6 +302,7 @@ func constructInterpolatedDoltMergeQuery(apr *argparser.ArgParseResults, cliCtx // printMergeStats calculates and prints all merge stats and information. func printMergeStats(result []sql.Row, apr *argparser.ArgParseResults, queryist cli.Queryist, sqlCtx *sql.Context, usage cli.UsagePrinter, headHash, mergeHash, fromRef, toRef string) int { + // dolt_merge returns hash, fast_forward, conflicts and dolt_pull returns fast_forward, conflicts fastForward := false if result != nil && len(result) > 0 { ffIndex := 0 diff --git a/go/cmd/dolt/commands/pull.go b/go/cmd/dolt/commands/pull.go index 74bc56cd3d..6f6a80d65f 100644 --- a/go/cmd/dolt/commands/pull.go +++ b/go/cmd/dolt/commands/pull.go @@ -290,6 +290,10 @@ func getRemoteHashForPull(apr *argparser.ArgParseResults, sqlCtx *sql.Context, q branch = apr.Args[1] } + if remote == "" || branch == "" { + return "", "", errors.New("pull finished successfully but remote and/or branch provided is empty") + } + remoteHash, err = getHashOf(queryist, sqlCtx, remote+"/"+branch) if err != nil { return "", "", err