Permalink
Browse files

Remove a potentially redundant git invocation and close pull request #…

  • Loading branch information...
1 parent dbdf5a1 commit 49810eaa6256a2d98e12694eef600d43bc5d42f3 @carsomyr carsomyr committed Oct 23, 2012
Showing with 1 addition and 2 deletions.
  1. +0 −1 lib/capistrano/recipes/deploy/scm/git.rb
  2. +1 −1 test/deploy/scm/git_test.rb
@@ -190,7 +190,6 @@ def sync(revision, destination)
if variable(:git_enable_submodules)
execute << "#{git} submodule #{verbose} init"
- execute << "for mod in `#{git} submodule status | awk '{ print $2 }'`; do #{git} config -f .git/config submodule.${mod}.url `#{git} config -f .gitmodules --get submodule.${mod}.url` && echo Synced $mod; done"
execute << "#{git} submodule #{verbose} sync"
if false == variable(:git_submodules_recursive)
execute << "#{git} submodule #{verbose} update --init"
@@ -127,7 +127,7 @@ def test_sync
# with submodules
@config[:git_enable_submodules] = true
- assert_equal "cd #{dest} && #{git} fetch -q origin && #{git} fetch --tags -q origin && #{git} reset -q --hard #{rev} && #{git} submodule -q init && for mod in `#{git} submodule status | awk '{ print $2 }'`; do #{git} config -f .git/config submodule.${mod}.url `#{git} config -f .gitmodules --get submodule.${mod}.url` && echo Synced $mod; done && #{git} submodule -q sync && export GIT_RECURSIVE=$([ ! \"`#{git} --version`\" \\< \"git version 1.6.5\" ] && echo --recursive) && #{git} submodule -q update --init $GIT_RECURSIVE && #{git} clean -q -d -x -f", @source.sync(rev, dest)
+ assert_equal "cd #{dest} && #{git} fetch -q origin && #{git} fetch --tags -q origin && #{git} reset -q --hard #{rev} && #{git} submodule -q init && #{git} submodule -q sync && export GIT_RECURSIVE=$([ ! \"`#{git} --version`\" \\< \"git version 1.6.5\" ] && echo --recursive) && #{git} submodule -q update --init $GIT_RECURSIVE && #{git} clean -q -d -x -f", @source.sync(rev, dest)
end
def test_sync_with_remote

0 comments on commit 49810ea

Please sign in to comment.