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
Revert "Make sure git fetches include tags"

This reverts commit 838f6abd74b4d4244111a698ab8b955fbe678cde.

[#6 tagged:reverted]
Jamis Buck (author)
Tue May 06 19:44:33 -0700 2008
commit  15e9ed54d8b2db039fbe7dd76413ad92db40fb9a
tree    be278440ff997d9f78dde7e25b827e71e877b195
parent  b3deb09d595a9bdb301b1cb8dd4428e6b616704e
...
1
2
 
 
3
4
5
...
9
10
11
12
13
14
15
16
...
1
2
3
4
5
6
7
...
11
12
13
 
 
14
15
16
0
@@ -1,5 +1,7 @@
0
 *unreleased*
0
 
0
+* Revert the "git fetch --tags" change, since it didn't work as expected [Jamis Buck]
0
+
0
 * Fix deploy:pending when using git SCM [Ryan McGeary]
0
 
0
 * Make sure deploy:check works with :none scm (which has no default command) [Jamis Buck]
0
@@ -9,8 +11,6 @@
0
 
0
 *2.3.0* May 2, 2008
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 --tags #{remote} && #{git} reset --hard #{revision}"
0
+          execute << "#{git} fetch #{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 --tags origin && git reset --hard #{rev}", @source.sync(rev, dest)
0
+    assert_equal "cd #{dest} && git fetch 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 --tags origin && #{git} reset --hard #{rev}", @source.sync(rev, dest)
0
+    assert_equal "cd #{dest} && #{git} fetch 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 --tags #{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 #{remote} && git reset --hard #{rev}", @source.sync(rev, dest)
0
   end
0
 
0
   def test_shallow_clone

Comments

timcharper Fri May 16 13:50:23 -0700 2008

Thank you for this commit – I just ran into an issue with the—tags parameter – it made git not download the branches.

Do you think this might be a bug in git? The git documentation doesn’t state anything about—tags NOT downloading heads, as well.

I’m going to do a post on the git mailing list.