Method: MGit::Repo::SyncHelper.sync_lock_point
- Defined in:
- lib/m-git/repo/sync_helper.rb
.sync_lock_point(repo, light_repo) ⇒ string
同步锁定点
126 127 128 129 130 131 132 133 134 135 136 137 138 |
# File 'lib/m-git/repo/sync_helper.rb', line 126 def sync_lock_point(repo, light_repo) if repo.status_checker.status == Status::GIT_REPO_STATUS[:dirty] return "#{light_repo.name}有本地改动,无法锁定,请自行清空修改后重试!" end if !light_repo.commit_id.nil? return sync_commit_id(repo, light_repo) elsif !light_repo.tag.nil? return sync_tag(repo, light_repo) elsif !light_repo.branch.nil? return sync_branch(repo, light_repo) end end |