parameters: ()
return_statement: return "upstream"
docstring: Get the remote name to use for upstream branches
  
      Uses "upstream" if it exists, "origin" otherwise
docstring_summary: Get the remote name to use for upstream branches
docstring_tokens: Get the remote name to use for upstream branches
function: def get_git_upstream_remote():
      """Get the remote name to use for upstream branches
  
      Uses "upstream" if it exists, "origin" otherwise
      """
      cmd = "git remote get-url upstream".split()
      try:
          subprocess.check_output(cmd, stderr=subprocess.PIPE)
      except subprocess.CalledProcessError:
          return "origin"
      return "upstream"
function_tokens: def get_git_upstream_remote ( ) : cmd = "git remote get-url upstream" . split ( ) try : subprocess . check_output ( cmd , stderr = subprocess . PIPE ) except subprocess . CalledProcessError : return "origin" return "upstream"