Method: MGit::Repo::SyncHelper.sync_tag

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

.sync_tag(repo, light_repo) ⇒ string

同步tag

Parameters:

Returns:

  • (string)

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



147
148
149
150
151
152
153
154
# File 'lib/m-git/repo/sync_helper.rb', line 147

def sync_tag(repo, light_repo)
  if !light_repo.tag.nil?
    success, output = repo.execute_git_cmd('checkout', light_repo.tag)
    return output if !success
  else
    return "\"#{repo.path}\"的仓库配置未指定tag!"
  end
end