def config_get(key, cwd=None, user=None, password=None, ignore_retcode=False, **kwargs):
 all_ = kwargs.pop('all', False)
 result = _config_getter('--get-all', key, cwd=cwd, user=user, password=password, ignore_retcode=ignore_retcode, **kwargs)
 if (result['retcode'] == 1):
  return None
 ret = result['stdout'].splitlines()
 if all_:
  return ret
 else:
  try:
   return ret[(-1)]
  except IndexError:
   return ''

def config_get ( key , cwd = None , user = None , password = None , ignore_retcode = False , ** kwargs ) : all_ = kwargs . pop ( 'all' , False ) result = _config_getter ( '--get-all' , key , cwd = cwd , user = user , password = password , ignore_retcode = ignore_retcode , ** kwargs ) if ( result [ 'retcode' ] == 1 ) : return None ret = result [ 'stdout' ] . splitlines ( ) if all_ : return ret else : try : return ret [ ( - 1 ) ] except IndexError : return ''
get the value of a key in the git configuration file key the name of the configuration key to get .