Skip to content

Commit 63a170b

Browse files
author
kselvraj
committed
OTWO-5702: Clean modified files before switching branch
1 parent 5912a01 commit 63a170b

File tree

3 files changed

+3
-2
lines changed

3 files changed

+3
-2
lines changed

lib/ohloh_scm/git/scm.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,8 +58,8 @@ def clean_and_checkout_branch
5858
run "cd '#{url}' && git clean -f -d -x"
5959
return unless status.branch?(branch_name)
6060

61+
run "cd '#{url}' && git reset --hard HEAD"
6162
run "cd '#{url}' && git checkout #{branch_name} --"
62-
run "cd '#{url}' && git reset --hard heads/#{branch_name} --"
6363
end
6464

6565
def create_tracking_branch(branch_name)

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.4'
5+
STRING = '3.0.5'
66
GIT = '2.17.1'
77
SVN = '1.9.7'
88
CVSNT = '2.5.04'

spec/ohloh_scm/activity_spec.rb

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
describe 'Activity' do
66
describe 'log_filename' do
77
it 'should return system tmp dir path' do
8+
ENV['OHLOH_SCM_TEMP_FOLDER_PATH'] = nil
89
core = get_core(:git)
910
scm = OhlohScm::Activity.new(core)
1011
scm.log_filename.must_equal "#{Dir.tmpdir}/foobar.log"

0 commit comments

Comments
 (0)