def read_git_file(path):
 result = None
 if (path and is_git_file(path)):
  header = u'gitdir: '
  data = core.read(path).strip()
  if data.startswith(header):
   result = data[len(header):]
 return result

def read_git_file ( path ) : result = None if ( path and is_git_file ( path ) ) : header = u'gitdir: ' data = core . read ( path ) . strip ( ) if data . startswith ( header ) : result = data [ len ( header ) : ] return result
read the path from a .