moll / mina-rsync

Deploy with Rsync from any local (or remote) repository when using Mina.
Other
50 stars 25 forks source link

wrap git fetch/reset in Dir.chdir(rsync_stage) #11

Open ghost opened 10 years ago

ghost commented 10 years ago

Environment: OS X 10.7.5, bash 4.3.11(1), ruby 2.1.1p76, gem 2.2.2

File: lib/mina/rsync.rb 
In task stage
    git reset --hard origin/#{settings.branch} was failing with the following:

git --git-dir tmp/deploy/.git --work-tree tmp/deploy reset --hard origin/master
error: packfile tmp/deploy/.git/objects/pack/pack-ac917f6f3e4ecd079fc654cb5acd6586840f2f97.pack    cannot be accessed
HEAD is now at ae0366c testing mina-rsync

This seems to be a bug in Git but wrapping git fetch/reset in Dir.chdir("#{settings.stage}") fixed the issue

chuckd commented 10 years ago

:+1: this is making life annoying for us