Method: MGit::Repo::SyncHelper.sync_remote_url

Defined in:
lib/m-git/repo/sync_helper.rb

.sync_remote_url(repo, light_repo) ⇒ Boolean

同步remote url

Parameters:

Returns:

  • (Boolean)

    执行结果,成功返回nil,错误返回错误信息



221
222
223
224
225
226
# File 'lib/m-git/repo/sync_helper.rb', line 221

def sync_remote_url(repo, light_repo)
  return nil if light_repo.url.nil?

  success, output = repo.execute_git_cmd('remote', "set-url origin #{light_repo.url}")
  return success ? nil : output
end