Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 0 additions & 14 deletions internal/commons/dolt.go
Original file line number Diff line number Diff line change
Expand Up @@ -210,20 +210,6 @@ func RemoteBranchExists(dbDir, remoteBranch string) (bool, error) {
}
return strings.TrimSpace(lines[1]) != "0", nil
}

// MergeRemoteTracking merges the origin remote tracking branch into the
// currently checked-out local branch. If the remote tracking branch doesn't
// exist or the merge fails, this is a best-effort no-op. Used in PR mode to
// bring stale local branches up to date with origin's data.
func MergeRemoteTracking(dbDir, branch string) error {
remoteBranch := "remotes/origin/" + branch
exists, err := RemoteBranchExists(dbDir, remoteBranch)
if err != nil || !exists {
return nil
}
return doltExec(dbDir, "merge", remoteBranch)
}

// CheckoutBranchFrom checks out a branch if it exists, or creates it from
// startPoint if it doesn't. Used in PR mode so new branches start from a
// clean upstream-aligned main, while existing branches (with pending
Expand Down