diff -r c0a6c19690ff -r 75979c8d4572 mercurial/subrepo.py --- a/mercurial/subrepo.py Thu Oct 12 19:20:04 2017 -0700 +++ b/mercurial/subrepo.py Thu Oct 12 23:30:46 2017 -0700 @@ -1347,7 +1347,7 @@ if e.errno != errno.ENOENT: raise error.Abort(genericerror % ( self._path, encoding.strtolocal(e.strerror))) - elif pycompat.osname == 'nt': + elif pycompat.iswindows: try: self._gitexecutable = 'git.cmd' out, err = self._gitnodir(['--version'])