javagit/src/main/java/edu/nyu/cs/javagit/api/Ref.java
public static Ref createRemoteRef(String repositoryName, String name) {
    CheckUtilities.checkStringArgument(name, "name");

    Ref cn = new Ref();
    cn.refType = RefType.REMOTE;
    cn.name = name;

    if (null != repositoryName && repositoryName.length() > 0) {
      cn.repositoryName = repositoryName;
    }

    return cn;
  }
public static Ref createRemoteRef(String repositoryName, String name) {
    CheckUtilities.checkStringArgument(name, "name");

    Ref cn = new Ref();
    cn.refType = RefType.REMOTE;
    cn.name = name;

    if (null != repositoryName && repositoryName.length() > 0) {
      cn.repositoryName = repositoryName;
    }

    return cn;
  }
Creates a <code>Ref</code> of type <code>REMOTE</code>.

@param repositoryName
The remote repository name of this ref. If the value is blank or null, the value will
be maintained as null.
@param name
The remote branch name of this ref. If the value is null, a
<code>NullPointerException</code> is thrown. If the value has length zero, an
<code>IllegalArgumentException</code> is thrown.
@return A <code>Ref</code> instance of type <code>REMOTE</code>.