comparison src/org/tmatesoft/hg/internal/PathGlobMatcher.java @ 418:528b6780a8bd

A bit of FIXME cleanup (mostly degraded to TODO post 1.0), comments and javadoc
author Artem Tikhomirov <tikhomirov.artem@gmail.com>
date Thu, 22 Mar 2012 21:02:20 +0100
parents 981f9f50bb6c
children
comparison
equal deleted inserted replaced
417:ccd7d25e5aea 418:528b6780a8bd
50 50
51 51
52 // HgIgnore.glob2regex is similar, but IsIgnore solves slightly different task 52 // HgIgnore.glob2regex is similar, but IsIgnore solves slightly different task
53 // (need to match partial paths, e.g. for glob 'bin' shall match not only 'bin' folder, but also any path below it, 53 // (need to match partial paths, e.g. for glob 'bin' shall match not only 'bin' folder, but also any path below it,
54 // which is not generally the case 54 // which is not generally the case
55 private static String glob2regexp(String glob) { // FIXME TESTS NEEDED!!! 55 private static String glob2regexp(String glob) { // TODO TESTS NEEDED!!!
56 int end = glob.length() - 1; 56 int end = glob.length() - 1;
57 if (glob.length() > 2 && glob.charAt(end) == '*' && glob.charAt(end - 1) == '.') { 57 if (glob.length() > 2 && glob.charAt(end) == '*' && glob.charAt(end - 1) == '.') {
58 end-=2; 58 end-=2;
59 } 59 }
60 boolean needLineEndMatch = true;//glob.charAt(end) != '*'; 60 boolean needLineEndMatch = true;//glob.charAt(end) != '*';