Retrieve the name of the upstream remote of a local branch
the buffer into which to write the name
the repository in which to look
the full name of the branch
0 or an error code