[JGIT PATCH 08/12] Copying constructor of MutableObjectId

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Signed-off-by: Marek Zawirski <marek.zawirski@xxxxxxxxx>
---
 .../src/org/spearce/jgit/lib/MutableObjectId.java  |   21 ++++++++++++++++++++
 1 files changed, 21 insertions(+), 0 deletions(-)

diff --git a/org.spearce.jgit/src/org/spearce/jgit/lib/MutableObjectId.java b/org.spearce.jgit/src/org/spearce/jgit/lib/MutableObjectId.java
index 954380b..f88d8cb 100644
--- a/org.spearce.jgit/src/org/spearce/jgit/lib/MutableObjectId.java
+++ b/org.spearce.jgit/src/org/spearce/jgit/lib/MutableObjectId.java
@@ -46,6 +46,27 @@ import org.spearce.jgit.util.NB;
  */
 public class MutableObjectId extends AnyObjectId {
 	/**
+	 * Empty constructor. Initialize object with default (zeros) value.
+	 */
+	public MutableObjectId() {
+		super();
+	}
+
+	/**
+	 * Copying constructor.
+	 * 
+	 * @param src
+	 *            original entry, to copy id from
+	 */
+	MutableObjectId(MutableObjectId src) {
+		this.w1 = src.w1;
+		this.w2 = src.w2;
+		this.w3 = src.w3;
+		this.w4 = src.w4;
+		this.w5 = src.w5;
+	}
+
+	/**
 	 * Convert an ObjectId from raw binary representation.
 	 * 
 	 * @param bs
-- 
1.5.5.1

--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux