fix for when the target is a symlink in the middle of the git tree