summaryrefslogtreecommitdiff
path: root/contrib/fast-import
diff options
context:
space:
mode:
authorSimon Hausmann <simon@lst.de>2007-06-11 06:50:57 (GMT)
committerSimon Hausmann <simon@lst.de>2007-06-11 06:50:57 (GMT)
commit6e5295c4d3e4e79838d1dd7ab4a8b4965e1c7f96 (patch)
tree897e2b3d040c8bd62a959732de21d0897c47bcbc /contrib/fast-import
parentcae7b732d859b06a4f560271099891f15c5700f6 (diff)
downloadgit-6e5295c4d3e4e79838d1dd7ab4a8b4965e1c7f96.zip
git-6e5295c4d3e4e79838d1dd7ab4a8b4965e1c7f96.tar.gz
git-6e5295c4d3e4e79838d1dd7ab4a8b4965e1c7f96.tar.bz2
Fix project name guessing
Signed-off-by: Simon Hausmann <simon@lst.de>
Diffstat (limited to 'contrib/fast-import')
-rwxr-xr-xcontrib/fast-import/git-p47
1 files changed, 6 insertions, 1 deletions
diff --git a/contrib/fast-import/git-p4 b/contrib/fast-import/git-p4
index 9d52ead..551573a 100755
--- a/contrib/fast-import/git-p4
+++ b/contrib/fast-import/git-p4
@@ -909,7 +909,12 @@ class P4Sync(Command):
def guessProjectName(self):
for p in self.depotPaths:
- return p [p.strip().rfind("/") + 1:]
+ if p.endswith("/"):
+ p = p[:-1]
+ p = p[p.strip().rfind("/") + 1:]
+ if not p.endswith("/"):
+ p += "/"
+ return p
def getBranchMapping(self):
for info in p4CmdList("branches"):