Browse Source

Move BaseReceivePack#db getter to ReceivePack

Another step toward eliminating BaseReceivePack as a separate API.

Change-Id: If7b7d5c65a043607a2424211adb479fa33a9077b
Signed-off-by: Jonathan Nieder <jrn@google.com>
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
stable-5.3
Jonathan Nieder 6 years ago committed by Matthias Sohn
parent
commit
aaf41a51b7
  1. 6
      org.eclipse.jgit/.settings/.api_filters
  2. 8
      org.eclipse.jgit/src/org/eclipse/jgit/transport/BaseReceivePack.java
  3. 10
      org.eclipse.jgit/src/org/eclipse/jgit/transport/ReceivePack.java

6
org.eclipse.jgit/.settings/.api_filters

@ -37,6 +37,12 @@
<message_argument value="getPushCertificate()"/>
</message_arguments>
</filter>
<filter id="421650549">
<message_arguments>
<message_argument value="org.eclipse.jgit.transport.BaseReceivePack"/>
<message_argument value="getRepository()"/>
</message_arguments>
</filter>
<filter id="421650549">
<message_arguments>
<message_argument value="org.eclipse.jgit.transport.BaseReceivePack"/>

8
org.eclipse.jgit/src/org/eclipse/jgit/transport/BaseReceivePack.java

@ -151,7 +151,7 @@ public abstract class BaseReceivePack {
}
/** Database we write the stored objects into. */
private final Repository db;
final Repository db;
/** Revision traversal support over {@link #db}. */
private final RevWalk walk;
@ -421,10 +421,10 @@ public abstract class BaseReceivePack {
* Get the repository this receive completes into.
*
* @return the repository this receive completes into.
* @deprecated use {@link ReceivePack#getRepository}
*/
public final Repository getRepository() {
return db;
}
@Deprecated
public abstract Repository getRepository();
/**
* Get the RevWalk instance used by this connection.

10
org.eclipse.jgit/src/org/eclipse/jgit/transport/ReceivePack.java

@ -92,6 +92,16 @@ public class ReceivePack extends BaseReceivePack {
postReceive = PostReceiveHook.NULL;
}
/**
* Get the repository this receive completes into.
*
* @return the repository this receive completes into.
*/
@Override
public final Repository getRepository() {
return db;
}
/**
* Get the push certificate used to verify the pusher's identity.
* <p>

Loading…
Cancel
Save