You're checking for a `git` in `$PATH` here, but not above.  Is that right?