You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Jul 28, 2024. It is now read-only.
Although the copy.rb script will make the copy into the release directory fast, this time is actually just shifting to the git reset --hard command since it will break all the hard links, even for unchanged files. Breaking hard links equates to copying the file to replace the hard link.
Ideally this would be fixed in git, but as a workaround I found that git reset --mixed #{revision} && git checkout -f . checks out the files without breaking hard links, so actually speeds up deploys when using fast_remote_cache.
Adding the following to config/deploy.rb will speed up deploys by using avoid git reset --hard.
moduleFastGitSyncdefsync(revision,destination)git=commandremote=originbranch=headexecute=[]execute << "cd #{destination}"execute << "#{git} fetch #{verbose}#{remote} +#{branch}:refs/remotes/#{remote}/#{branch}"# Reset the git indexexecute << "#{git} reset #{verbose} --mixed #{revision}"# Checkout the index into the work treeexecute << "#{git} checkout -f ."# Remove untracked filesexecute << "#{git} clean #{verbose} -d -x -f"execute.join(" && ")endendset(:source){Capistrano::Deploy::SCM.new(scm,self).extend(FastGitSync)}
Some conditions from sync where removed for brevity. See the original source for the sync method for details.
Any thoughts on how this change should be integrated into fast_remote_cache?
The text was updated successfully, but these errors were encountered:
Although the copy.rb script will make the copy into the release directory fast, this time is actually just shifting to the
git reset --hard
command since it will break all the hard links, even for unchanged files. Breaking hard links equates to copying the file to replace the hard link.Ideally this would be fixed in git, but as a workaround I found that
git reset --mixed #{revision} && git checkout -f .
checks out the files without breaking hard links, so actually speeds up deploys when using fast_remote_cache.Adding the following to config/deploy.rb will speed up deploys by using avoid
git reset --hard
.Some conditions from sync where removed for brevity. See the original source for the sync method for details.
Any thoughts on how this change should be integrated into fast_remote_cache?
The text was updated successfully, but these errors were encountered: