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

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: Marek Zawirski
Date: Tuesday, August 19, 2008 - 7:57 pm

Signed-off-by: Marek Zawirski <marek.zawirski@gmail.com>
---
 .../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@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
[EGIT PATCH 10/31] Improve javadoc of Transport push(), Marek Zawirski, (Sun Aug 17, 1:43 pm)
[EGIT PATCH 17/31] Fix typo in uitext.properties message, Marek Zawirski, (Sun Aug 17, 1:43 pm)
[EGIT PATCH 27/31] Add few EPL Eclipse icons, Marek Zawirski, (Sun Aug 17, 1:44 pm)
[EGIT PATCH 28/31] Checkbox images/screenshots, Marek Zawirski, (Sun Aug 17, 1:44 pm)
[EGIT PATCH 30/31] Add PushOperation to plugin, Marek Zawirski, (Sun Aug 17, 1:44 pm)
[EGIT PATCH 31/31] Push GUI, Marek Zawirski, (Sun Aug 17, 1:44 pm)
Re: [EGIT PATCH 28/31] Checkbox images/screenshots, Robin Rosenberg, (Tue Aug 19, 11:24 am)
[EGIT PATCH 2/6] Emphasize that db is a local one in Remot ..., Marek Zawirski, (Tue Aug 19, 7:57 pm)
[EGIT PATCH 6/6] Fix RefSpecPage formatting, Marek Zawirski, (Tue Aug 19, 7:57 pm)
Git-aware Issue Tracking?, Petr Baudis, (Wed Aug 20, 8:23 am)
Re: Git-aware Issue Tracking?, Shawn O. Pearce, (Wed Aug 20, 9:44 am)
Re: Git-aware Issue Tracking?, Jakub Narebski, (Wed Aug 20, 11:52 am)
Re: Git-aware Issue Tracking?, Mike Dalessio, (Wed Aug 20, 1:22 pm)
Re: Git-aware Issue Tracking?, Robin Rosenberg, (Wed Aug 20, 1:25 pm)
Re: Git-aware Issue Tracking?, Pierre Habouzit, (Thu Aug 21, 1:30 am)
Re: Git-aware Issue Tracking?, Martin Langhoff, (Thu Aug 21, 1:47 am)
Re: Git-aware Issue Tracking?, Imran M Yousuf, (Thu Aug 21, 1:55 am)
Re: Git-aware Issue Tracking?, Jakub Narebski, (Thu Aug 21, 2:23 am)