示例#1
0
 TrackingRefUpdate(
     boolean canForceUpdate,
     String remoteName,
     String localName,
     AnyObjectId oldValue,
     AnyObjectId newValue) {
   this.remoteName = remoteName;
   this.localName = localName;
   this.forceUpdate = canForceUpdate;
   this.oldObjectId = oldValue.copy();
   this.newObjectId = newValue.copy();
 }
示例#2
0
 /**
  * Add a parent onto the end of the parent list.
  *
  * @param additionalParent new parent to add onto the end of the current parent list.
  */
 public void addParentId(AnyObjectId additionalParent) {
   if (parentIds.length == 0) {
     setParentId(additionalParent);
   } else {
     ObjectId[] newParents = new ObjectId[parentIds.length + 1];
     for (int i = 0; i < parentIds.length; i++) newParents[i] = parentIds[i];
     newParents[parentIds.length] = additionalParent.copy();
     parentIds = newParents;
     commitId = null;
   }
 }
示例#3
0
 /**
  * Set the parent of this commit.
  *
  * @param newParent the single parent for the commit.
  */
 public void setParentId(AnyObjectId newParent) {
   parentIds = new ObjectId[] {newParent.copy()};
   commitId = null;
 }
示例#4
0
 /**
  * Set the parents of this commit.
  *
  * @param parent1 the first parent of this commit. Typically this is the current value of the
  *     {@code HEAD} reference and is thus the current branch's position in history.
  * @param parent2 the second parent of this merge commit. Usually this is the branch being merged
  *     into the current branch.
  */
 public void setParentIds(AnyObjectId parent1, AnyObjectId parent2) {
   parentIds = new ObjectId[] {parent1.copy(), parent2.copy()};
   commitId = null;
 }
示例#5
0
 /**
  * Set the tree id for this commit object
  *
  * @param id the tree identity.
  */
 public void setTreeId(AnyObjectId id) {
   treeId = id.copy();
   commitId = null;
 }