Skip to content

Commit

Permalink
Revert "Make sure git fetches include tags"
Browse files Browse the repository at this point in the history
This reverts commit 838f6ab.

[capistrano#6 tagged:reverted]
  • Loading branch information
jamis committed May 7, 2008
1 parent b3deb09 commit 15e9ed5
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions CHANGELOG
@@ -1,5 +1,7 @@
*unreleased*

* Revert the "git fetch --tags" change, since it didn't work as expected [Jamis Buck]

* Fix deploy:pending when using git SCM [Ryan McGeary]

* Make sure deploy:check works with :none scm (which has no default command) [Jamis Buck]
Expand All @@ -9,8 +11,6 @@

*2.3.0* May 2, 2008

* Make sure git fetches include tags [Alex Arnell]

* Make deploy:setup obey the :use_sudo and :runner directives, and generalize the :use_sudo and :runner options into a try_sudo() helper method [Jamis Buck]

* Make sudo helper play nicely with complex command chains [Jamis Buck]
Expand Down
2 changes: 1 addition & 1 deletion lib/capistrano/recipes/deploy/scm/git.rb
Expand Up @@ -184,7 +184,7 @@ def sync(revision, destination)
end

# since we're in a local branch already, just reset to specified revision rather than merge
execute << "#{git} fetch --tags #{remote} && #{git} reset --hard #{revision}"
execute << "#{git} fetch #{remote} && #{git} reset --hard #{revision}"

if configuration[:git_enable_submodules]
execute << "#{git} submodule init"
Expand Down
6 changes: 3 additions & 3 deletions test/deploy/scm/git_test.rb
Expand Up @@ -66,12 +66,12 @@ def test_command_should_be_backwards_compatible
def test_sync
dest = "/var/www"
rev = 'c2d9e79'
assert_equal "cd #{dest} && git fetch --tags origin && git reset --hard #{rev}", @source.sync(rev, dest)
assert_equal "cd #{dest} && git fetch origin && git reset --hard #{rev}", @source.sync(rev, dest)

# With :scm_command
git = "/opt/local/bin/git"
@config[:scm_command] = git
assert_equal "cd #{dest} && #{git} fetch --tags origin && #{git} reset --hard #{rev}", @source.sync(rev, dest)
assert_equal "cd #{dest} && #{git} fetch origin && #{git} reset --hard #{rev}", @source.sync(rev, dest)
end

def test_sync_with_remote
Expand All @@ -83,7 +83,7 @@ def test_sync_with_remote
@config[:repository] = repository
@config[:remote] = remote

assert_equal "cd #{dest} && git config remote.#{remote}.url #{repository} && git config remote.#{remote}.fetch +refs/heads/*:refs/remotes/#{remote}/* && git fetch --tags #{remote} && git reset --hard #{rev}", @source.sync(rev, dest)
assert_equal "cd #{dest} && git config remote.#{remote}.url #{repository} && git config remote.#{remote}.fetch +refs/heads/*:refs/remotes/#{remote}/* && git fetch #{remote} && git reset --hard #{rev}", @source.sync(rev, dest)
end

def test_shallow_clone
Expand Down

0 comments on commit 15e9ed5

Please sign in to comment.