summaryrefslogtreecommitdiffstats
path: root/org.eclipse.jgit
diff options
context:
space:
mode:
authorShawn O. Pearce <spearce@spearce.org>2010-06-22 16:48:37 -0700
committerShawn O. Pearce <spearce@spearce.org>2010-06-23 16:54:14 -0700
commitbfc43c13bcf65d9ed29a9b1c70a829bcec9c5693 (patch)
treeb180f96a4184d5ce0d5ec2bd2243e5a50f34d8db /org.eclipse.jgit
parent8e4069704751193b6b915894a05f73cb367b2bd0 (diff)
downloadjgit-bfc43c13bcf65d9ed29a9b1c70a829bcec9c5693.tar.gz
jgit-bfc43c13bcf65d9ed29a9b1c70a829bcec9c5693.zip
Expose RefUpdate constructor to any subclass
When we finally move RefDirectory to the new storage.file package, its associated RefDirectoryUpdate will need visiblity to this constructor in order to initialize itself. This is true of any other repository implementation, so make it protected rather than package level visible. Change-Id: If838aec9baeb80ee2f12dcbca717657c725a9242 Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
Diffstat (limited to 'org.eclipse.jgit')
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/lib/RefUpdate.java11
1 files changed, 10 insertions, 1 deletions
diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/lib/RefUpdate.java b/org.eclipse.jgit/src/org/eclipse/jgit/lib/RefUpdate.java
index 89f59150a0..e04a587ac2 100644
--- a/org.eclipse.jgit/src/org/eclipse/jgit/lib/RefUpdate.java
+++ b/org.eclipse.jgit/src/org/eclipse/jgit/lib/RefUpdate.java
@@ -167,7 +167,16 @@ public abstract class RefUpdate {
private final Ref ref;
- RefUpdate(final Ref ref) {
+ /**
+ * Construct a new update operation for the reference.
+ * <p>
+ * {@code ref.getObjectId()} will be used to seed {@link #getOldObjectId()},
+ * which callers can use as part of their own update logic.
+ *
+ * @param ref
+ * the reference that will be updated by this operation.
+ */
+ protected RefUpdate(final Ref ref) {
this.ref = ref;
oldValue = ref.getObjectId();
refLogMessage = "";