def _git_config(cwd, user, password):
 contextkey = ('git.config.' + cwd)
 if (contextkey not in __context__):
  git_dir = rev_parse(cwd, opts=['--git-dir'], user=user, password=password, ignore_retcode=True)
  if (not os.path.isabs(git_dir)):
   paths = (cwd, git_dir, 'config')
  else:
   paths = (git_dir, 'config')
  __context__[contextkey] = os.path.join(*paths)
 return __context__[contextkey]

def _git_config ( cwd , user , password ) : contextkey = ( 'git.config.' + cwd ) if ( contextkey not in __context__ ) : git_dir = rev_parse ( cwd , opts = [ '--git-dir' ] , user = user , password = password , ignore_retcode = True ) if ( not os . path . isabs ( git_dir ) ) : paths = ( cwd , git_dir , 'config' ) else : paths = ( git_dir , 'config' ) __context__ [ contextkey ] = os . path . join ( * paths ) return __context__ [ contextkey ]
helper to retrieve git config options .