Fix pexpect calls in git project type to avoid infinite hanging.

Yeah, I almost already forgot.