mina-rsync icon indicating copy to clipboard operation
mina-rsync copied to clipboard

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

Open ghost opened this issue 10 years ago • 1 comments

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

ghost avatar May 27 '14 14:05 ghost

:+1: this is making life annoying for us

chuckd avatar Jul 29 '14 01:07 chuckd