]> source.dussan.org Git - jgit.git/commit
IndexDiffFilter: handle path prefixes correctly 70/169170/2
authorThomas Wolf <thomas.wolf@paranor.ch>
Thu, 10 Sep 2020 21:39:07 +0000 (23:39 +0200)
committerMatthias Sohn <matthias.sohn@sap.com>
Mon, 21 Sep 2020 20:52:43 +0000 (16:52 -0400)
commitcb553e3583aec02336edd1d4115ac8a14537a475
tree3af80560beead7d71913f73d62d0b9a2e42c2836
parent566e49d7d39b12c785be24b8b61b4960a4b7ea17
IndexDiffFilter: handle path prefixes correctly

When comparing git directory paths to check whether one is a prefix
of another, one must add a slash to avoid false prefix matches when
one directory name is a prefix of another. The path "audio" is not
a prefix of the path "audio-new", but would be a prefix of a path
"audio/new".

Bug: 566799
Change-Id: I6f671ca043c7c2c6044eb05a71dc8cca8d0ee040
Signed-off-by: Thomas Wolf <thomas.wolf@paranor.ch>
org.eclipse.jgit.test/tst/org/eclipse/jgit/api/StatusCommandTest.java
org.eclipse.jgit/src/org/eclipse/jgit/treewalk/filter/IndexDiffFilter.java