def check_git():
 if (not os.path.isdir('.git')):
  print 'No .git dir, ignoring'
  print ()
  return False
 untracked = []
 gitst = subprocess.check_output(['git', 'status', '--porcelain'])
 gitst = gitst.decode('UTF-8').strip()
 for line in gitst.splitlines():
  (s, name) = line.split(maxsplit=1)
  if ((s == '??') and (name != '.venv/')):
   untracked.append(name)
 status = True
 if untracked:
  status = False
  utils.print_col('Untracked files:', 'red')
  print '\n'.join(untracked)
 print ()
 return status

def check_git ( ) : if ( not os . path . isdir ( '.git' ) ) : print 'No .git dir, ignoring' print ( ) return False untracked = [ ] gitst = subprocess . check_output ( [ 'git' , 'status' , '--porcelain' ] ) gitst = gitst . decode ( 'UTF-8' ) . strip ( ) for line in gitst . splitlines ( ) : ( s , name ) = line . split ( maxsplit = 1 ) if ( ( s == '??' ) and ( name != '.venv/' ) ) : untracked . append ( name ) status = True if untracked : status = False utils . print_col ( 'Untracked files:' , 'red' ) print '\n' . join ( untracked ) print ( ) return status
check for uncommitted git files .