def find_git():
 if (not utils.is_win32()):
  return None
 git_bindir = os.path.expanduser(os.path.join(u'~', u'.config', u'git-cola', u'git-bindir'))
 if core.exists(git_bindir):
  custom_path = core.read(git_bindir).strip()
  if (custom_path and core.exists(custom_path)):
   return custom_path
 pf = os.environ.get(u'ProgramFiles', u'C:\\Program Files')
 pf32 = os.environ.get(u'ProgramFiles(x86)', u'C:\\Program Files (x86)')
 for p in [pf32, pf, u'C:\\']:
  candidate = os.path.join(p, u'Git\\bin')
  if os.path.isdir(candidate):
   return candidate
 return None

def find_git ( ) : if ( not utils . is_win32 ( ) ) : return None git_bindir = os . path . expanduser ( os . path . join ( u'~' , u'.config' , u'git-cola' , u'git-bindir' ) ) if core . exists ( git_bindir ) : custom_path = core . read ( git_bindir ) . strip ( ) if ( custom_path and core . exists ( custom_path ) ) : return custom_path pf = os . environ . get ( u'ProgramFiles' , u'C:\\Program Files' ) pf32 = os . environ . get ( u'ProgramFiles(x86)' , u'C:\\Program Files (x86)' ) for p in [ pf32 , pf , u'C:\\' ] : candidate = os . path . join ( p , u'Git\\bin' ) if os . path . isdir ( candidate ) : return candidate return None
return the path of git .