Skip to content

Commit b4edfc8

Browse files
committed
Fix remote engine tests
1 parent e64ce09 commit b4edfc8

File tree

1 file changed

+18
-3
lines changed

1 file changed

+18
-3
lines changed

go/cmd/dolt/commands/utils.go

Lines changed: 18 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -711,15 +711,30 @@ func getCommitInfoWithOptions(queryist cli.Queryist, sqlCtx *sql.Context, ref st
711711
return nil, fmt.Errorf("error parsing timestamp '%s': %v", row[3], err)
712712
}
713713
message := row[4].(string)
714-
commitOrder := row[5].(uint64)
714+
715+
var commitOrder uint64
716+
switch v := row[5].(type) {
717+
case uint64:
718+
commitOrder = v
719+
case string:
720+
var err error
721+
commitOrder, err = strconv.ParseUint(v, 10, 64)
722+
if err != nil {
723+
return nil, fmt.Errorf("error parsing commit_order '%s': %v", v, err)
724+
}
725+
default:
726+
return nil, fmt.Errorf("unexpected type for commit_order: %T", v)
727+
}
728+
715729
parent := row[6].(string)
716730
height := commitOrder
717731

718732
isHead := commitHash == hashOfHead
719733

720734
var signature string
721-
if len(row) > 8 {
722-
signature = row[8].(string)
735+
if opts.showSignature {
736+
// Signature is always the last column when present
737+
signature = row[len(row)-1].(string)
723738
}
724739

725740
localBranchesForHash, err := getBranchesForHash(queryist, sqlCtx, commitHash, true)

0 commit comments

Comments
 (0)