[EGIT PATCH 2/6] Emphasize that db is a local one in RemoteRefUpdate

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

 



Signed-off-by: Marek Zawirski <marek.zawirski@xxxxxxxxx>
---
 .../spearce/jgit/transport/RemoteRefUpdate.java    |   20 ++++++++++----------
 1 files changed, 10 insertions(+), 10 deletions(-)

diff --git a/org.spearce.jgit/src/org/spearce/jgit/transport/RemoteRefUpdate.java b/org.spearce.jgit/src/org/spearce/jgit/transport/RemoteRefUpdate.java
index 42588c1..66fe6a1 100644
--- a/org.spearce.jgit/src/org/spearce/jgit/transport/RemoteRefUpdate.java
+++ b/org.spearce.jgit/src/org/spearce/jgit/transport/RemoteRefUpdate.java
@@ -133,15 +133,15 @@
 
 	private String message;
 
-	private final Repository db;
+	private final Repository localDb;
 
 	/**
 	 * Construct remote ref update request by providing an update specification.
 	 * Object is created with default {@link Status#NOT_ATTEMPTED} status and no
 	 * message.
-	 *
-	 * @param db
-	 *            repository to push from.
+	 * 
+	 * @param localDb
+	 *            local repository to push from.
 	 * @param srcRef
 	 *            source revision - any string resolvable by
 	 *            {@link Repository#resolve(String)}. This resolves to the new
@@ -173,26 +173,26 @@
 	 * @throws IllegalArgumentException
 	 *             if some required parameter was null
 	 */
-	public RemoteRefUpdate(final Repository db, final String srcRef,
+	public RemoteRefUpdate(final Repository localDb, final String srcRef,
 			final String remoteName, final boolean forceUpdate,
 			final String localName, final ObjectId expectedOldObjectId)
 			throws IOException {
 		if (remoteName == null)
 			throw new IllegalArgumentException("Remote name can't be null.");
 		this.srcRef = srcRef;
-		this.newObjectId = (srcRef == null ? ObjectId.zeroId() : db
+		this.newObjectId = (srcRef == null ? ObjectId.zeroId() : localDb
 				.resolve(srcRef));
 		if (newObjectId == null)
 			throw new IOException("Source ref " + srcRef
 					+ " doesn't resolve to any object.");
 		this.remoteName = remoteName;
 		this.forceUpdate = forceUpdate;
-		if (localName != null && db != null)
-			trackingRefUpdate = new TrackingRefUpdate(db, localName,
+		if (localName != null && localDb != null)
+			trackingRefUpdate = new TrackingRefUpdate(localDb, localName,
 					remoteName, forceUpdate, newObjectId, "push");
 		else
 			trackingRefUpdate = null;
-		this.db = db;
+		this.localDb = localDb;
 		this.expectedOldObjectId = expectedOldObjectId;
 		this.status = Status.NOT_ATTEMPTED;
 	}
@@ -215,7 +215,7 @@ public RemoteRefUpdate(final Repository db, final String srcRef,
 	 */
 	public RemoteRefUpdate(final RemoteRefUpdate base,
 			final ObjectId newExpectedOldObjectId) throws IOException {
-		this(base.db, base.srcRef, base.remoteName, base.forceUpdate,
+		this(base.localDb, base.srcRef, base.remoteName, base.forceUpdate,
 				(base.trackingRefUpdate == null ? null : base.trackingRefUpdate
 						.getLocalName()), newExpectedOldObjectId);
 	}
-- 
1.5.6.3

--
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