Hi *,

being a new capistrano (and ruby-) user I wonder whether the use of
git with :remote_cache could not be made more effecient. Right now, we
copy the whole checkout including the .git directory for every
release.
IMHO the following would be much faster and more space efficient:

# first checkout of the repo cache as a bare. (only done once):
git clone --mirror #{repository} #{repository_cache}

# update the repo cache before each checkout:
git --git-dir=#{repository_cache} fetch #{repository}

# checkout a release from the repo cache:
mkdir #{release_path} && \
  cd #{release_path} && \
  git --git-dir=#{repository_cache} --work-dir=. reset --hard #
{branch}


This way we would keep a bare repository without any checked out files
current in the repository cache, and produce a quick and slim checkout
for the release without duplicating the whole .git directory
everytime.
This would save both deployment time and storage space, in my case
quite significantly.

Did I overlook a compelling reason not to go this route? I'm about to
dig into cap's internals to try to implement this (as a plugin
maybe?), but before I waste my time on something stupid, I'd rather
ask for advice here.

Any thoughts?
  bkw

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