瀏覽代碼

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>
tags/v5.3.0.201901161700-m1
Jonathan Nieder 5 年之前
父節點
當前提交
aaf41a51b7

+ 6
- 0
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"/>

+ 4
- 4
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
- 0
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…
取消
儲存