MCPcopy Index your code
hub / github.com/rilldata/rill / HandleRepoTransfer

Method HandleRepoTransfer

cli/pkg/cmdutil/helper.go:562–583  ·  view source on GitHub ↗
(path, remote string)

Source from the content-addressed store, hash-verified

560}
561
562func (h *Helper) HandleRepoTransfer(path, remote string) error {
563 // clear cache
564 h.gitHelperMu.Lock()
565 h.gitHelper = nil
566 h.gitHelperMu.Unlock()
567
568 // remove rill managed remote
569 err := removeRemote(path, "__rill_remote")
570 if err != nil {
571 return err
572 }
573
574 // set origin to remote
575 err = gitutil.SetRemote(path, &gitutil.Config{
576 Remote: remote,
577 })
578 if err != nil {
579 return err
580 }
581
582 return nil
583}
584
585// CommitAndSafePush commits changes and safely pushes them to the remote repository.
586// It fetches the latest remote changes, checks for conflicts, and handles them based on defaultPushChoice:

Callers 2

InferProjectsMethod · 0.95

Calls 4

SetRemoteFunction · 0.92
removeRemoteFunction · 0.85
LockMethod · 0.45
UnlockMethod · 0.45

Tested by

no test coverage detected