git-p4: match branches case insensitively if configured
[gitweb.git] / git-p4.py
index c0a3068b6f3994a0389f5458f7b35e06ee589519..f3e5ccb7af4c7e2e77e5f278e73ddd3d13230fff 100755 (executable)
--- a/git-p4.py
+++ b/git-p4.py
@@ -2668,7 +2668,7 @@ def stripRepoPath(self, path, prefixes):
             path = self.clientSpecDirs.map_in_client(path)
             if self.detectBranches:
                 for b in self.knownBranches:
-                    if path.startswith(b + "/"):
+                    if p4PathStartsWith(path, b + "/"):
                         path = path[len(b)+1:]
 
         elif self.keepRepoPath:
@@ -2723,7 +2723,7 @@ def splitFilesIntoBranches(self, commit):
             for branch in self.knownBranches.keys():
                 # add a trailing slash so that a commit into qt/4.2foo
                 # doesn't end up in qt/4.2, e.g.
-                if relPath.startswith(branch + "/"):
+                if p4PathStartsWith(relPath, branch + "/"):
                     if branch not in branches:
                         branches[branch] = []
                     branches[branch].append(file)