Browse Source

Merge "Use System.arraycopy to copy parent object id array"

stable-1.3
Shawn Pearce 13 years ago committed by Code Review
parent
commit
580def2a23
  1. 3
      org.eclipse.jgit/src/org/eclipse/jgit/lib/CommitBuilder.java

3
org.eclipse.jgit/src/org/eclipse/jgit/lib/CommitBuilder.java

@ -204,8 +204,7 @@ public class CommitBuilder {
setParentId(additionalParent);
} else {
ObjectId[] newParents = new ObjectId[parentIds.length + 1];
for (int i = 0; i < parentIds.length; i++)
newParents[i] = parentIds[i];
System.arraycopy(parentIds, 0, newParents, 0, parentIds.length);
newParents[parentIds.length] = additionalParent.copy();
parentIds = newParents;
}

Loading…
Cancel
Save