]> source.dussan.org Git - jgit.git/commit
Fix bugs in TreeWalk#isPathSuffix used by PathSuffixFilter 08/15708/1
authorRobin Stocker <robin@nibor.org>
Mon, 8 Jul 2013 08:51:52 +0000 (10:51 +0200)
committerMatthias Sohn <matthias.sohn@sap.com>
Wed, 21 Aug 2013 12:44:47 +0000 (14:44 +0200)
commitc128100800edf6d2cf9c3106a8dc97b04b96f099
tree99d4d6c0252d3eb48616689b0113500b59d01dc3
parentc222b1880861e80898befff17ee3cf0d5414521e
Fix bugs in TreeWalk#isPathSuffix used by PathSuffixFilter

* It didn't check the first character in the pattern due to a off-by-one
  error. Spotted by James Roper.
* It returned true even when pattern was longer than current path, e.g.
  it returned that ".txt" is suffix of "txt".

Bug: 411999
Change-Id: I9fbcd68a11fb57cc49956b70c387a47271a0424f
Signed-off-by: Robin Stocker <robin@nibor.org>
org.eclipse.jgit.test/tst/org/eclipse/jgit/treewalk/filter/PathSuffixFilterTest.java
org.eclipse.jgit/src/org/eclipse/jgit/treewalk/TreeWalk.java