git_branch_remote_name

Find the remote name of a remote-tracking branch

This will return the name of the remote whose fetch refspec is matching the given branch. E.g. given a branch "refs/remotes/test/master", it will extract the "test" part. If refspecs from multiple remotes match, the function will return GIT_EAMBIGUOUS.

@param out_ The buffer into which the name will be written. @param repo The repository where the branch lives. @param refname complete name of the remote tracking branch.

@return 0 on success, GIT_ENOTFOUND when no matching remote was found, GIT_EAMBIGUOUS when the branch maps to several remotes, otherwise an error code.

extern (C) nothrow @nogc
int
git_branch_remote_name

Meta