javagit/src/main/java/edu/nyu/cs/javagit/api/Ref.java
public static Ref createHeadRef(int headOffset) {
    CheckUtilities.checkIntArgumentGreaterThan(headOffset, -1, "headOffset");

    if (0 == headOffset) {
      return HEAD;
    } else if (1 == headOffset) {
      return HEAD_1;
    }

    Ref cn = new Ref();
    cn.refType = RefType.HEAD;
    cn.headOffset = headOffset;
    return cn;
  }
public static Ref createHeadRef(int headOffset) {
    CheckUtilities.checkIntArgumentGreaterThan(headOffset, -1, "headOffset");

    if (0 == headOffset) {
      return HEAD;
    } else if (1 == headOffset) {
      return HEAD_1;
    }

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

@param headOffset
The offset of the commit back from the HEAD commit on the current working branch. If
the value is less than zero, an <code>IllegalArgumentException</code> is thrown.
@return A <code>Ref</code> instance of type <code>HEAD</code>.