public Iterable<RevCommit> call() throws GitAPIException, NoHeadException {checkCallable();List<TreeFilter> filters = new ArrayList<>();if (!pathFilters.isEmpty()) {filters.add(AndTreeFilter.create(PathFilterGroup.create(pathFilters), TreeFilter.ANY_DIFF));}if (!excludeTreeFilters.isEmpty()) {for (TreeFilter f : excludeTreeFilters) {filters.add(AndTreeFilter.create(f, TreeFilter.ANY_DIFF));}}if (!filters.isEmpty()) {if (filters.size() == 1) {filters.add(TreeFilter.ANY_DIFF);}walk.setTreeFilter(AndTreeFilter.create(filters));}if (skip > -1 && maxCount > -1)walk.setRevFilter(AndRevFilter.create(SkipRevFilter.create(skip),MaxCountRevFilter.create(maxCount)));else if (skip > -1)walk.setRevFilter(SkipRevFilter.create(skip));else if (maxCount > -1)walk.setRevFilter(MaxCountRevFilter.create(maxCount));if (!startSpecified) {try {ObjectId headId = repo.resolve(Constants.HEAD);if (headId == null)throw new NoHeadException(JGitText.get().noHEADExistsAndNoExplicitStartingRevisionWasSpecified);add(headId);} catch (IOException e) {throw new JGitInternalException(JGitText.get().anExceptionOccurredWhileTryingToAddTheIdOfHEAD,e);}}if (this.revFilter != null) {walk.setRevFilter(this.revFilter);}setCallable(false);return walk;}
public override Iterable<RevCommit> Call(){CheckCallable();if (pathFilters.Count > 0){walk.SetTreeFilter(AndTreeFilter.Create(PathFilterGroup.Create(pathFilters), TreeFilter.ANY_DIFF));}if (skip > -1 && maxCount > -1){walk.SetRevFilter(AndRevFilter.Create(SkipRevFilter.Create(skip), MaxCountRevFilter.Create(maxCount)));}else{if (skip > -1){walk.SetRevFilter(SkipRevFilter.Create(skip));}else{if (maxCount > -1){walk.SetRevFilter(MaxCountRevFilter.Create(maxCount));}}}if (!startSpecified){try{ObjectId headId = repo.Resolve(Constants.HEAD);if (headId == null){throw new NoHeadException(JGitText.Get().noHEADExistsAndNoExplicitStartingRevisionWasSpecified);}Add(headId);}catch (IOException e){throw new JGitInternalException(JGitText.Get().anExceptionOccurredWhileTryingToAddTheIdOfHEAD, e);}}SetCallable(false);return walk;}