Merge branch 'maint'
authorJunio C Hamano <gitster@pobox.com>
Mon, 30 Mar 2009 06:11:23 +0000 (23:11 -0700)
committerJunio C Hamano <gitster@pobox.com>
Mon, 30 Mar 2009 06:11:23 +0000 (23:11 -0700)
* maint:
git-svn: fix ls-tree usage with dash-prefixed paths
import-zips: fix thinko

contrib/fast-import/import-zips.py
index c674fa2d1b5c6ab47ebb5e828c427c6d47bb50fc..7051a83a59758277dd60fe026dea730eb7b6b115 100755 (executable)
@@ -44,7 +44,8 @@ def printlines(list):
                        common_prefix = name[:name.rfind('/') + 1]
                else:
                        while not name.startswith(common_prefix):
-                               common_prefix = name[:name.rfind('/') + 1]
+                               last_slash = common_prefix[:-1].rfind('/') + 1
+                               common_prefix = common_prefix[:last_slash]
 
                mark[name] = ':' + str(next_mark)
                next_mark += 1