[EGIT PATCH 03/23] Refactor TrackingRefUpdate to not hold RefSpec

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: Marek Zawirski
Date: Friday, June 27, 2008 - 3:06 pm

Just remoteName is needed, not a whole RefSpec.

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

diff --git a/org.spearce.jgit/src/org/spearce/jgit/transport/TrackingRefUpdate.java b/org.spearce.jgit/src/org/spearce/jgit/transport/TrackingRefUpdate.java
index 56234a1..771e77a 100644
--- a/org.spearce.jgit/src/org/spearce/jgit/transport/TrackingRefUpdate.java
+++ b/org.spearce.jgit/src/org/spearce/jgit/transport/TrackingRefUpdate.java
@@ -49,14 +49,14 @@ import org.spearce.jgit.revwalk.RevWalk;
 
 /** Update of a locally stored tracking branch. */
 public class TrackingRefUpdate {
-	private final RefSpec spec;
+	private final String remoteName;
 
 	private final RefUpdate update;
 
-	TrackingRefUpdate(final Repository db, final RefSpec s,
+	TrackingRefUpdate(final Repository db, final RefSpec spec,
 			final AnyObjectId nv, final String msg) throws IOException {
-		spec = s;
-		update = db.updateRef(s.getDestination());
+		remoteName = spec.getSource();
+		update = db.updateRef(spec.getDestination());
 		update.setForceUpdate(spec.isForceUpdate());
 		update.setNewObjectId(nv);
 		update.setRefLogMessage(msg, true);
@@ -70,7 +70,7 @@ public class TrackingRefUpdate {
 	 * @return the name used within the remote repository.
 	 */
 	public String getRemoteName() {
-		return spec.getSource();
+		return remoteName;
 	}
 
 	/**
-- 
1.5.5.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 00/23] Push implementation, Marek Zawirski, (Fri Jun 27, 3:06 pm)
[EGIT PATCH 03/23] Refactor TrackingRefUpdate to not hold ..., Marek Zawirski, (Fri Jun 27, 3:06 pm)
[EGIT PATCH 05/23] Add RemoteRefUpdate class, Marek Zawirski, (Fri Jun 27, 3:06 pm)
Re: [EGIT PATCH 00/23] Push implementation, Robin Rosenberg, (Fri Jun 27, 4:25 pm)