diff options
-rwxr-xr-x | git-p4.py | 4 | ||||
-rwxr-xr-x | t/t9801-git-p4-branch.sh | 4 |
2 files changed, 4 insertions, 4 deletions
@@ -2668,7 +2668,7 @@ class P4Sync(Command, P4UserMap): 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 @@ class P4Sync(Command, P4UserMap): 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) diff --git a/t/t9801-git-p4-branch.sh b/t/t9801-git-p4-branch.sh index c48532e..4779448 100755 --- a/t/t9801-git-p4-branch.sh +++ b/t/t9801-git-p4-branch.sh @@ -650,7 +650,7 @@ test_expect_success !CASE_INSENSITIVE_FS 'basic p4 branches for case folding' ' ' # Check that files are properly split across branches when ignorecase is set -test_expect_failure !CASE_INSENSITIVE_FS 'git p4 clone, branchList branch definition, ignorecase' ' +test_expect_success !CASE_INSENSITIVE_FS 'git p4 clone, branchList branch definition, ignorecase' ' test_when_finished cleanup_git && test_create_repo "$git" && ( @@ -676,7 +676,7 @@ test_expect_failure !CASE_INSENSITIVE_FS 'git p4 clone, branchList branch defini ' # Check that files are properly split across branches when ignorecase is set, use-client-spec case -test_expect_failure !CASE_INSENSITIVE_FS 'git p4 clone with client-spec, branchList branch definition, ignorecase' ' +test_expect_success !CASE_INSENSITIVE_FS 'git p4 clone with client-spec, branchList branch definition, ignorecase' ' client_view "//depot/... //client/..." && test_when_finished cleanup_git && test_create_repo "$git" && |