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

    Ref cn = new Ref();
    cn.refType = RefType.SHA1;
    cn.name = name;
    return cn;
  }
public static Ref createSha1Ref(String name) {
    CheckUtilities.checkStringArgument(name, "name");

    Ref cn = new Ref();
    cn.refType = RefType.SHA1;
    cn.name = name;
    return cn;
  }
Creates a <code>Ref</code> of type <code>SHA1</code>.

@param name
The SHA1 name of this ref. The value can be a short name or the full SHA1 value. 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>SHA1</code>.