def for_each_ref_basename(refs, git=git):
 out = git.for_each_ref(refs, format=u'%(refname)')[STDOUT]
 output = out.splitlines()
 non_heads = [x for x in output if (not x.endswith(u'/HEAD'))]
 return list(map((lambda x: x[(len(refs) + 1):]), non_heads))

def for_each_ref_basename ( refs , git = git ) : out = git . for_each_ref ( refs , format = u'%(refname)' ) [ STDOUT ] output = out . splitlines ( ) non_heads = [ x for x in output if ( not x . endswith ( u'/HEAD' ) ) ] return list ( map ( ( lambda x : x [ ( len ( refs ) + 1 ) : ] ) , non_heads ) )
return refs starting with refs .