Hi all!

I think I have a correction to the git SCM module. Let me give you a
quick scenario first.
Normally, me and my team develop in the master branch, and when we
deploy using capistrano, we tag our release and create a release
branch for future hotfixes. This is done by tagging locally, creating
a local branch and pushing both tag and branch to the server. After
that we deploy from the tag, or from the branch (in case of a
hotfix).

When deploying, the git scm module does a "git checkout -b deploy
#{branch}" after cloning the repository.  This works when deploying
the master branch or a tag (since tags are always available when
cloning a repo), but not for other branches. This is because of the
fact that remote branches aren't cloned implicitly.

Long story short: a fix would be to to change line 120 from:

execute += "cd #{destination} && #{git} checkout -b deploy #{branch}"

to:

execute += "cd #{destination} && #{git} checkout -b deploy origin/
#{branch}"

A workaround is to tag every time we want to deploy from a different
branch then master.

Grtz,

Wouter


--~--~---------~--~----~------------~-------~--~----~
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