Use the same test for a valid git repository that git-sh-setup-script uses.
tree40bdcc093a4d958c69af6f1d61038fa3d472eaa1
-rw-r--r-- 18009 COPYING
-rw-r--r-- 480 Makefile
-rw-r--r-- 1039 README
-rwxr-xr-x 1513 buildMain.py
-rw-r--r-- 1488 ctcore.py
-rw-r--r-- 4304 git.py
-rw-r--r-- 1994 hg.py
-rwxr-xr-x 13965 main.py
-rw-r--r-- 40956 mysubprocess.py