// MergeRemoteBranch merges all commits until the given one
// from a remote branch to current local branch.
// This always adds a new merge commit into tree.
MergeRemoteBranch merges all commits until the given one
from a remote branch to current local branch.
This always adds a new merge commit into tree.
// MergeRemoteBranch merges all commits until the given one // from a remote branch to current local branch . // This always adds a new merge commit into tree .
func (r *repo) MergeRemoteBranch(ctx context.Context, branch, commit, mergeCommitMessage string) error {
	out, err := r.runGitCommand(ctx, "fetch", r.remote, branch)
	if err != nil {
		return formatCommandError(err, out)
	}
	out, err = r.runGitCommand(ctx, "merge", "-q", "--no-ff", "-m", mergeCommitMessage, commit)
	if err != nil {
		return formatCommandError(err, out)
	}
	return nil
}
func ( r * repo ) MergeRemoteBranch ( ctx context . Context , branch , commit , mergeCommitMessage string ) error { out , err := r . runGitCommand ( ctx , " " , r . remote , branch ) if err != nil { return formatCommandError ( err , out ) } out , err = r . runGitCommand ( ctx , " " , " " , " " , " " , mergeCommitMessage , commit ) if err != nil { return formatCommandError ( err , out ) } return nil }
MergeRemoteBranch merges all commits until the given one
from a remote branch to current local branch.
MergeRemoteBranch merges all commits until the given one from a remote branch to current local branch .