public
Description: Remote multi-server automation tool. This repository is no longer being actively maintained. Please ask on the mailing list to find someone who has a well-maintained fork. Thanks!
Homepage: http://www.capify.org
Clone URL: git://github.com/jamis/capistrano.git
Make sure git fetches include tags [#6 tagged:committed status:resolved]
Jamis Buck (author)
Fri May 02 13:42:26 -0700 2008
commit  838f6abd74b4d4244111a698ab8b955fbe678cde
tree    851324d5a509efc3789ac9a14656265794dd5b8d
parent  552a4924284d7f74a327b163ead1fe6b992c9c60
...
1
2
 
 
3
4
5
...
1
2
3
4
5
6
7
0
@@ -1,5 +1,7 @@
0
 *unreleased*
0
 
0
+* Make sure git fetches include tags [Alex Arnell]
0
+
0
 * 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]
0
 
0
 * Make sudo helper play nicely with complex command chains [Jamis Buck]
...
184
185
186
187
 
188
189
190
...
184
185
186
 
187
188
189
190
0
@@ -184,7 +184,7 @@ module Capistrano
0
           end
0
 
0
           # since we're in a local branch already, just reset to specified revision rather than merge
0
-          execute << "#{git} fetch #{remote} && #{git} reset --hard #{revision}"
0
+          execute << "#{git} fetch --tags #{remote} && #{git} reset --hard #{revision}"
0
 
0
           if configuration[:git_enable_submodules]
0
             execute << "#{git} submodule init"
...
66
67
68
69
 
70
71
72
73
74
 
75
76
77
...
83
84
85
86
 
87
88
89
...
66
67
68
 
69
70
71
72
73
 
74
75
76
77
...
83
84
85
 
86
87
88
89
0
@@ -66,12 +66,12 @@ class DeploySCMGitTest < Test::Unit::TestCase
0
   def test_sync
0
     dest = "/var/www"
0
     rev = 'c2d9e79'
0
-    assert_equal "cd #{dest} && git fetch origin && git reset --hard #{rev}", @source.sync(rev, dest)
0
+    assert_equal "cd #{dest} && git fetch --tags origin && git reset --hard #{rev}", @source.sync(rev, dest)
0
 
0
     # With :scm_command
0
     git = "/opt/local/bin/git"
0
     @config[:scm_command] = git
0
-    assert_equal "cd #{dest} && #{git} fetch origin && #{git} reset --hard #{rev}", @source.sync(rev, dest)
0
+    assert_equal "cd #{dest} && #{git} fetch --tags origin && #{git} reset --hard #{rev}", @source.sync(rev, dest)
0
   end
0
 
0
   def test_sync_with_remote
0
@@ -83,7 +83,7 @@ class DeploySCMGitTest < Test::Unit::TestCase
0
     @config[:repository] = repository
0
     @config[:remote] = remote
0
 
0
-    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)
0
+    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)
0
   end
0
 
0
   def test_shallow_clone

Comments