Please sign in to comment.
Merge pull request #1213 from tigris/bundler
--- Use the --git-dir and --work-tree options for existing git repos rather than chdir to them. This is due to some problem with cron not properly chdiring. We run a "bundle install" in our git/hook/post-merge, and "git pull" out of cron ever hour. So if you push code to github, cron will pull it out on the hour and then post-merge will run the bundle install. All non-interactive. Unforunately this barfs on gems that use git as the source. From debugging it seems that when bundler does a chdir and then invokes git, the chain is something like cron -> invoked git -> invoked bundler -> chdird -> invoked git. For some reason the last git doesnt see the chdir and tries to run its git commands from ".". The only solution I see is to not chdir for git, but instead pass git the flags it needs to know which repo to act upon. Which is the solution I have implemented here, and it fixes the problem while still working normally as well (outside of cron).
- Loading branch information...