Add linux version of git_copy_last_diff