setUpstreamTo method

Future<BranchConfig?> setUpstreamTo(
  1. GitRemoteConfig remote,
  2. String remoteBranchName
)

Implementation

Future<BranchConfig?> setUpstreamTo(
    GitRemoteConfig remote, String remoteBranchName) async {
  var branchName = await currentBranch();
  if (branchName == null) {
    // FIXME: I don't like this silently returning null
    //        If this is failing, please give me an error!
    return null;
  }
  return setBranchUpstreamTo(branchName, remote, remoteBranchName);
}