Fix branch detection in multi-branch imports
authorSimon Hausmann <shausman@rhea.troll.no>
Mon, 21 May 2007 21:25:51 +0000 (23:25 +0200)
committerSimon Hausmann <shausman@rhea.troll.no>
Mon, 21 May 2007 21:25:51 +0000 (23:25 +0200)
git-p4

diff --git a/git-p4 b/git-p4
index 40264cd..515f7a9 100755 (executable)
--- a/git-p4
+++ b/git-p4
@@ -556,7 +556,7 @@ class P4Sync(Command):
             relPath = path[len(self.depotPath):]
 
             for branch in self.knownBranches.keys():
-                if relPath.startswith(branch):
+                if relPath.startswith(branch + "/"): # add a trailing slash so that a commit into qt/4.2foo doesn't end up in qt/4.2
                     if branch not in branches:
                         branches[branch] = []
                     branches[branch].append(file)