What this really says to me is two things:

1. There really is no "export" option in git, and the SCM::Git#export
method in Capistrano should raise an exception instead of pretending to
be something it isn't.

2. If you want to use git-filter-branch or git-archive to deploy your
code, you should probably be looking at a specialized deployment
strategy, and not trying to shoehorn the :export strategy.

I'd rather not try to force this to be something it isn't.

- Jamis

On 1/24/09 9:37 AM, David W. Body wrote:
> I take back what I said about "git archive" being more efficient than
> "git filter-branch."  I've just been playing with these on a real
> repository, and "git archive" is quite slow for me. I wish I could
> remember what I did differently that made me think it was faster than
> "git filter-branch."
> 
> There is an even bigger issue, though. Github apparently doesn't
> support "git archive."  See
> 
>   http://groups.google.com/group/github/browse_thread/thread/cfcbcb1dc5f41f16
> 
> --David
> 
> On Jan 22, 8:26 pm, "David W. Body" <[email protected]> wrote:
>> Jamis,
>>
>> I've incorporated Bryan Cardillo's patch from
>>
>>  http://capistrano.lighthouseapp.com/projects/8716/tickets/65-git-expo...
>>
>> 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