Fix bugs in git-extract