From 939723807ec13855444ca19955fe8901709cd6f1 Mon Sep 17 00:00:00 2001 From: Jonathan Nieder Date: Wed, 26 Dec 2018 16:05:34 -0800 Subject: [PATCH] Move BaseReceivePack#walk getter to ReceivePack Another step toward merging BaseReceivePack into ReceivePack. Change-Id: I43cf2e36e2d5b0cd85bf23c81469909c14757b63 Signed-off-by: Jonathan Nieder Signed-off-by: Matthias Sohn --- org.eclipse.jgit/.settings/.api_filters | 6 ++++++ .../org/eclipse/jgit/transport/BaseReceivePack.java | 8 ++++---- .../src/org/eclipse/jgit/transport/ReceivePack.java | 11 +++++++++++ 3 files changed, 21 insertions(+), 4 deletions(-) diff --git a/org.eclipse.jgit/.settings/.api_filters b/org.eclipse.jgit/.settings/.api_filters index 4dc35df4a..af529a027 100644 --- a/org.eclipse.jgit/.settings/.api_filters +++ b/org.eclipse.jgit/.settings/.api_filters @@ -43,6 +43,12 @@ + + + + + + diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/transport/BaseReceivePack.java b/org.eclipse.jgit/src/org/eclipse/jgit/transport/BaseReceivePack.java index d4942e680..e7d15683b 100644 --- a/org.eclipse.jgit/src/org/eclipse/jgit/transport/BaseReceivePack.java +++ b/org.eclipse.jgit/src/org/eclipse/jgit/transport/BaseReceivePack.java @@ -154,7 +154,7 @@ public abstract class BaseReceivePack { final Repository db; /** Revision traversal support over {@link #db}. */ - private final RevWalk walk; + final RevWalk walk; /** * Is the client connection a bi-directional socket or pipe? @@ -430,10 +430,10 @@ public abstract class BaseReceivePack { * Get the RevWalk instance used by this connection. * * @return the RevWalk instance used by this connection. + * @deprecated use {@link ReceivePack#getRevWalk} */ - public final RevWalk getRevWalk() { - return walk; - } + @Deprecated + public abstract RevWalk getRevWalk(); /** * Get refs which were advertised to the client. diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/transport/ReceivePack.java b/org.eclipse.jgit/src/org/eclipse/jgit/transport/ReceivePack.java index 912d6c5da..91bf39e28 100644 --- a/org.eclipse.jgit/src/org/eclipse/jgit/transport/ReceivePack.java +++ b/org.eclipse.jgit/src/org/eclipse/jgit/transport/ReceivePack.java @@ -60,6 +60,7 @@ import org.eclipse.jgit.lib.ConfigConstants; import org.eclipse.jgit.lib.Constants; import org.eclipse.jgit.lib.NullProgressMonitor; import org.eclipse.jgit.lib.Repository; +import org.eclipse.jgit.revwalk.RevWalk; import org.eclipse.jgit.transport.ReceiveCommand.Result; import org.eclipse.jgit.transport.RefAdvertiser.PacketLineOutRefAdvertiser; @@ -102,6 +103,16 @@ public class ReceivePack extends BaseReceivePack { return db; } + /** + * Get the RevWalk instance used by this connection. + * + * @return the RevWalk instance used by this connection. + */ + @Override + public final RevWalk getRevWalk() { + return walk; + } + /** * Get the push certificate used to verify the pusher's identity. *