Yeah, it's a bug in cap 2.3's git module -- it shouldn't be doing "git fetch --tags". It's been fixed, and I'll release an update tonight or tomorrow (time permitting).

- Jamis

On May 28, 2008, at 11:56 AM, Mirko wrote:


So I have tried deploying with the following settings:

set :scm, :git
set :deploy_via, :copy
set :copy_cache, true
set :copy_exclude, %w(.git)
set :git_shallow_clone, 1

However, I am getting the following error message during the deploy:

 * refreshing local cache to revision
f0ab3b2a0e4d99c0ea6720fae2df5fb853135bee at /var/folders/
38/38oRkH3gEFKzHxrW7VoXJE+++TI/-Tmp-/repository
   executing locally: cd /var/folders/38/38oRkH3gEFKzHxrW7VoXJE+++TI/-
Tmp-/repository && git fetch --tags origin && git reset --hard
f0ab3b2a0e4d99c0ea6720fae2df5fb853135bee
fatal: Could not parse object
'f0ab3b2a0e4d99c0ea6720fae2df5fb853135bee'.


If I comment out the copy_cache setting, everything works fine
(although I suppose the copy_exclude setting is ignored then; not
sure)/

Looking at the Capistrano 2.3.0 announcement (http://
weblog.jamisbuck.org/2008/5/2/capistrano-2-3-0), it looks like
somebody had the same exact problem (comment # 31 by Thomas, which
mentions the --tags option being the problem).

-Mirko


On May 26, 11:45 pm, Mirko <[EMAIL PROTECTED]> wrote:
Perfect! I'll use copy_exclude along with git_shallow_clone, which
should make for a nice and efficient git deployment.

Thanks.

-Mirko

On 26 May, 17:30, Jamis Buck <[EMAIL PROTECTED]> wrote:

If you're using the :copy strategy, with :copy_cache set to true, then
you can set :copy_exclude to an array containing ".git" to have it
exclude the .git directory, e.g.:

   set :deploy_via, :copy
   set :copy_cache, true
   set :copy_exclude, %w(.git)

(This only works with cap 2.3 and later.)

- Jamis

On May 26, 2008, at 5:05 PM, Mirko wrote:

I am using Cap 2.3.0, which I believe is the latest version. And it
definitely still includes the .git directory in the .tar.gz file.

But doing a shallow clone sounds like the way to go, so I will give
this a shot. Thanks for the hint!

-Mirko

On 25 May, 09:28, "Scott Chacon" <[EMAIL PROTECTED]> wrote:
What version of Cap are you using?  The newer one _should_ be
removing
the .git directory. However, it's still not very efficient, because it just checks out everything and then removes the '.git' dir - you
might want to try the 'set :git_shallow_clone, 1' command, which
should be closer to an export and will leave the .git dir but should
not include much in it.

Scott

On Sun, May 25, 2008 at 9:11 AM, Mirko <[EMAIL PROTECTED]> wrote:

We are using Capistrano to deploy an application stored in Git. We
specify "set :deploy_via, :copy" to transfer a tarball via ssh,
rather
than checking out the code on the remote server. All of this works
great, except for one minor hitch:

After we accidentally checked a large file into Git, deployments
were
suddenly taking a long time. Even after we removed the file, this
situation did not improve. This turned out to be because the tarball
includes not just the code, but also the ".git" directory, which
contains the entire version history. So even if we hadn't checked
in a
huge file right now, this style of deployment would eventually
become
very slow as the revision history grows (particularly since many
broadband connections are still fairly limited in upload bandwidth).

What would be the easiest way to modify the Capistrano / Git
deployment tasks to exclude the ".git" directory? Do you think this
should be the default?

-Mirko

 smime.p7s
3KDownload
--~--~---------~--~----~------------~-------~--~----~
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at http://groups.google.com/group/capistrano
-~----------~----~----~----~------~----~------~--~---


Attachment: smime.p7s
Description: S/MIME cryptographic signature

Reply via email to