summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLibravatar Junio C Hamano <gitster@pobox.com>2009-03-29 23:11:13 -0700
committerLibravatar Junio C Hamano <gitster@pobox.com>2009-03-29 23:11:13 -0700
commit510a309e5e0997c73d97c85332a99d622f06ace6 (patch)
tree4736eb8c3b4f53071a31030fe20a9cfdeeadfcfc
parentgit-svn: fix ls-tree usage with dash-prefixed paths (diff)
parentMerge branch 'maint-1.6.0' into maint-1.6.1 (diff)
downloadtgif-510a309e5e0997c73d97c85332a99d622f06ace6.tar.xz
Merge branch 'maint-1.6.1' into maint
* maint-1.6.1: import-zips: fix thinko
-rwxr-xr-xcontrib/fast-import/import-zips.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/contrib/fast-import/import-zips.py b/contrib/fast-import/import-zips.py
index c674fa2d1b..7051a83a59 100755
--- a/contrib/fast-import/import-zips.py
+++ b/contrib/fast-import/import-zips.py
@@ -44,7 +44,8 @@ for zipfile in argv[1:]:
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