def refspec_arg(local_branch, remote_branch, pull, push):
 if ((not pull) and local_branch and remote_branch):
  what = refspec(remote_branch, local_branch, push=push)
 else:
  what = (local_branch or remote_branch or None)
 return what

def refspec_arg ( local_branch , remote_branch , pull , push ) : if ( ( not pull ) and local_branch and remote_branch ) : what = refspec ( remote_branch , local_branch , push = push ) else : what = ( local_branch or remote_branch or None ) return what
return the refspec for a fetch or pull command .