diff --git a/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/MergeBase.java b/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/MergeBase.java index 22d33582f..60b174376 100644 --- a/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/MergeBase.java +++ b/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/MergeBase.java @@ -70,14 +70,16 @@ class MergeBase extends TextBuiltin { @Override protected void run() { try { - for (RevCommit c : commits) + for (RevCommit c : commits) { argWalk.markStart(c); + } argWalk.setRevFilter(RevFilter.MERGE_BASE); int max = all ? Integer.MAX_VALUE : 1; while (max-- > 0) { final RevCommit b = argWalk.next(); - if (b == null) + if (b == null) { break; + } outw.println(b.getId().name()); } } catch (IOException e) {