1
2
3
4
5
6
7
8
9
10
11
12 package org.eclipse.jgit.revwalk;
13
14 import java.io.IOException;
15
16 import org.eclipse.jgit.errors.IncorrectObjectTypeException;
17 import org.eclipse.jgit.errors.MissingObjectException;
18
19
20
21
22
23
24
25
26
27
28 final class FixUninterestingGenerator extends Generator {
29 private final Generator pending;
30
31 FixUninterestingGenerator(Generator g) {
32 super(g.firstParent);
33 pending = g;
34 }
35
36 @Override
37 int outputType() {
38 return pending.outputType();
39 }
40
41 @Override
42 RevCommit next() throws MissingObjectException,
43 IncorrectObjectTypeException, IOException {
44 for (;;) {
45 final RevCommit c = pending.next();
46 if (c == null)
47 return null;
48 if ((c.flags & RevWalk.UNINTERESTING) == 0)
49 return c;
50 }
51 }
52 }