Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'org.eclipse.jgit/src/org/eclipse/jgit/transport/ReceivePack.java')
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/transport/ReceivePack.java19
1 files changed, 6 insertions, 13 deletions
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 0d79110289..fd57308d7d 100644
--- a/org.eclipse.jgit/src/org/eclipse/jgit/transport/ReceivePack.java
+++ b/org.eclipse.jgit/src/org/eclipse/jgit/transport/ReceivePack.java
@@ -821,7 +821,8 @@ public class ReceivePack {
});
}
- postReceive.onPostReceive(this, filterCommands(Result.OK));
+ postReceive.onPostReceive(this,
+ ReceiveCommand.filter(commands, Result.OK));
if (unpackError != null)
throw new UnpackException(unpackError);
@@ -1165,9 +1166,11 @@ public class ReceivePack {
}
private void executeCommands() {
- preReceive.onPreReceive(this, filterCommands(Result.NOT_ATTEMPTED));
+ preReceive.onPreReceive(this,
+ ReceiveCommand.filter(commands, Result.NOT_ATTEMPTED));
- List<ReceiveCommand> toApply = filterCommands(Result.NOT_ATTEMPTED);
+ List<ReceiveCommand> toApply = ReceiveCommand.filter(commands,
+ Result.NOT_ATTEMPTED);
ProgressMonitor updating = NullProgressMonitor.INSTANCE;
if (sideBand) {
SideBandProgressMonitor pm = new SideBandProgressMonitor(msgOut);
@@ -1182,16 +1185,6 @@ public class ReceivePack {
updating.endTask();
}
- private List<ReceiveCommand> filterCommands(final Result want) {
- final List<ReceiveCommand> r = new ArrayList<ReceiveCommand>(commands
- .size());
- for (final ReceiveCommand cmd : commands) {
- if (cmd.getResult() == want)
- r.add(cmd);
- }
- return r;
- }
-
private void sendStatusReport(final boolean forClient, final Reporter out)
throws IOException {
if (unpackError != null) {

Back to the top