Jamis,

I've incorporated Bryan Cardillo's patch from

  
http://capistrano.lighthouseapp.com/projects/8716/tickets/65-git-export-should-use-archive

into the export method of git module, changing Bryan's :path variable
to :app_root for consistency with my other changes. The result is on
github at

  http://github.com/davidbody/capistrano/tree/master

Bryan's git archive approach is significantly more efficient than the
git filter-branch approach I used in the checkout method.

I originally thought about changing the checkout method to also use
git archive, but I haven't done this because the RDoc on
Capistrano::Deploy::SCM::Base#checkout says

# Checkout a copy of the repository, at the given +revision+, to the
# given +destination+. The checkout is suitable for doing development
# work in, e.g. allowing subsequent commits and updates.

I want to make sure the git checkout method is doing what it's
supposed to do.  Thoughts?

--David

On Jan 19, 5:19 pm, "David W. Body" <[email protected]> wrote:
> Jamis,
>
> Git archive looks promising.  I'll take a look and let you know what I
> find out.
>
> --David
>
> On Jan 19, 3:00 pm, Jamis Buck <[email protected]> wrote:
>
> > David,
>
> > Thanks for looking into this. Someone (I'm so bad, I can't even remember
> > who it was, sorry!) recently posted another solution involving "git
> > archive", which sounded like safe and efficient option for supporting
> > this. Perhaps you could work your app_root option into the changes they
> > proposed? They posted the patch to Capistrano's lighthouse:
>
> >http://capistrano.lighthouseapp.com/projects/8716-capistrano/tickets
>
> > - Jamis
>
> > On 1/19/09 10:58 AM, David W. Body wrote:
>
> > > Jamis and everyone,
>
> > > Like several other Capistrano users, I've had a need to deploy
> > > applications located in subdirectories of git repositories.  I've
> > > tried several approaches, and none have been completely satisfactory.
>
> > > The best solution I've come up with so far is to add an :app_root
> > > variable to my recipe and set it to the subdirectory in my git
> > > repository that I want to actually deploy. I set :app_root like this
>
> > >   set :app_root, "my_app"
>
> > > To make this work, I also modified Capistrano's git module so that it
> > > executes the following command after cloning the repository:
>
> > >   git filter-branch --subdirectory-filter my_app
>
> > > I'm pretty new to git, so I don't know if this is the best solution.
> > > I think running git filter-branch on a large repository is probably a
> > > pretty expensive operation, but this approach seems to work OK for
> > > smaller repositories.
>
> > > [Note to other git newbies: If you want to try this command, only run
> > > it on a clone of your repository. You'll be very unhappy with me (and
> > > yourself) if you run it on your actual working repository.]
>
> > > I just pushed these changes to a fork of Capistrano on github:
>
> > >  http://github.com/davidbody/capistrano/tree/master
>
> > > I'd appreciate feedback from anyone, especially from git experts.
>
> > > --David W. Body / Big Creek Software, LLC
--~--~---------~--~----~------------~-------~--~----~
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at http://groups.google.com/group/capistrano
-~----------~----~----~----~------~----~------~--~---

Reply via email to