Implementing the -<#> flag from C git is less trivial.
Change-Id: Idb55a303304a6d4055aaf37d0b4dcf92c684e25f
revLimiter.add(MessageRevFilter.create(msg));
}
+ @Option(name = "--max-count", aliases = "-n", metaVar = "metaVar_n")
+ private int maxCount = -1;
+
@Override
protected void run() throws Exception {
walk = createWalk();
protected int walkLoop() throws Exception {
int n = 0;
for (final RevCommit c : walk) {
- n++;
+ if (++n > maxCount && maxCount >= 0)
+ break;
show(c);
}
if (walk instanceof ObjectWalk) {