File tree Expand file tree Collapse file tree 2 files changed +5
-3
lines changed Expand file tree Collapse file tree 2 files changed +5
-3
lines changed Original file line number Diff line number Diff line change @@ -25,7 +25,10 @@ def clone_projects
2525 clone_cmd = "#{ project . type } clone #{ project . connection } #{ path } "
2626
2727 if project . type == 'git'
28- clone_cmd += " --depth 1 --branch #{ project . tag } --single-branch" # don't download whole history
28+ # Don't download whole history
29+ # Note we don't use --single-branch, because the repo is downloaded
30+ # once but may be used with several tags.
31+ clone_cmd += ' --depth 1'
2932 end
3033 Cmd . execute ( clone_cmd )
3134 end
Original file line number Diff line number Diff line change @@ -38,8 +38,7 @@ def test_build
3838
3939 def expect_git_clone ( name , url , revision )
4040 File . stubs ( :exist? ) . with ( "target/repositories/#{ name } " ) . returns ( false ) . once
41- PmdTester ::Cmd . stubs ( :execute ) . with ( "git clone #{ url } target/repositories/#{ name } " \
42- "--depth 1 --branch #{ revision } --single-branch" ) . once
41+ PmdTester ::Cmd . stubs ( :execute ) . with ( "git clone #{ url } target/repositories/#{ name } --depth 1" ) . once
4342 Dir . stubs ( :chdir ) . with ( "target/repositories/#{ name } " ) . yields . once
4443 PmdTester ::Cmd . stubs ( :execute ) . with ( "git checkout #{ revision } ; git reset --hard #{ revision } " ) . once
4544 end
You can’t perform that action at this time.
0 commit comments