diff options
author | Piotr Janik <janikpiotrek@gmail.com> | 2011-05-18 16:22:08 +0200 |
---|---|---|
committer | Chris Aniszczyk <caniszczyk@gmail.com> | 2011-05-18 10:35:25 -0500 |
commit | 7449b9a297af193107560c42508c53d7adb00226 (patch) | |
tree | e7618c016f797d744299fbc2a36dbaffe7da5da4 /org.eclipse.jgit | |
parent | d781554b79b50e5c3fe468373e87edf8957d7578 (diff) | |
download | jgit-7449b9a297af193107560c42508c53d7adb00226.tar.gz jgit-7449b9a297af193107560c42508c53d7adb00226.zip |
Fix path filtering in LogCommand
Bug: 346257
Change-Id: Ib897e1b4962162da9670164479a844aeea7dfcd1
Signed-off-by: Piotr Janik <janikpiotrek@gmail.com>
Signed-off-by: Chris Aniszczyk <caniszczyk@gmail.com>
Diffstat (limited to 'org.eclipse.jgit')
-rw-r--r-- | org.eclipse.jgit/src/org/eclipse/jgit/api/LogCommand.java | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/api/LogCommand.java b/org.eclipse.jgit/src/org/eclipse/jgit/api/LogCommand.java index 9b39d52a2a..cbdfe56106 100644 --- a/org.eclipse.jgit/src/org/eclipse/jgit/api/LogCommand.java +++ b/org.eclipse.jgit/src/org/eclipse/jgit/api/LogCommand.java @@ -58,8 +58,10 @@ import org.eclipse.jgit.lib.ObjectId; import org.eclipse.jgit.lib.Repository; import org.eclipse.jgit.revwalk.RevCommit; import org.eclipse.jgit.revwalk.RevWalk; +import org.eclipse.jgit.treewalk.filter.AndTreeFilter; import org.eclipse.jgit.treewalk.filter.PathFilter; import org.eclipse.jgit.treewalk.filter.PathFilterGroup; +import org.eclipse.jgit.treewalk.filter.TreeFilter; /** * A class used to execute a {@code Log} command. It has setters for all @@ -103,7 +105,8 @@ public class LogCommand extends GitCommand<Iterable<RevCommit>> { JGitInternalException { checkCallable(); if (pathFilters.size() > 0) - walk.setTreeFilter(PathFilterGroup.create(pathFilters)); + walk.setTreeFilter(AndTreeFilter.create( + PathFilterGroup.create(pathFilters), TreeFilter.ANY_DIFF)); if (!startSpecified) { try { ObjectId headId = repo.resolve(Constants.HEAD); |