Skip to content

Commit 5808511

Browse files
committed
OTWO-5773 Check for head_token before git fetch
Before ohloh_scm v3, we used to check for head_token before doing a git fetch. In v3, we instead did a simple check for git operation. Since we have a new *index.lock* issue in ohloh_scm v3, we can try reverting back to older logic to help narrow down the cause.
1 parent 0f3fcc2 commit 5808511

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

lib/ohloh_scm/git/scm.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ def vcs_path
2727

2828
def clone_or_fetch(remote_scm, callback)
2929
callback.update(0, 1)
30-
if status.branch?(branch_name)
30+
if status.exist? && status.branch?(branch_name)
3131
clean_and_checkout_branch # must be on correct branch, but we want to be careful.
3232
fetch_new_commits(remote_scm)
3333
else
@@ -43,7 +43,7 @@ def fetch_new_commits(remote_scm)
4343
end
4444

4545
def clone_and_create_tracking_branch(remote_scm)
46-
unless status.scm_dir_exist?
46+
unless status.exist?
4747
run "rm -rf '#{url}'"
4848
run "git clone -q -n '#{remote_scm.url}' '#{url}'"
4949
end

lib/ohloh_scm/version.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
module OhlohScm
44
module Version
5-
STRING = '3.0.6'
5+
STRING = '3.0.7'
66
GIT = '2.17.1'
77
SVN = '1.9.7'
88
CVSNT = '2.5.04'

0 commit comments

Comments
 (0)