@matheusbsbs / matheus-bagliano / commits / 3b167396b4
Fork 0

git-p4: remove tabs from usermap file

Some users have tabs in their names, oddly enough. This causes problems when loading the usercache from disk, as split separates the fields on the wrong tabs. When fast-import's parse_ident() tries to parse the committer field, it is unhappy about the unbalanced <..> angle brackets. It is easy enough to convert the tabs to single spaces. Signed-off-by: Pete Wyckoff <pw@padd.com> Acked-by: Simon Hausmann <simon@lst.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>

Pete Wyckoff committed Feb 27, 2009 at 10:53 UTC 3b167396b416541f7559f3141392d56b93ea049c
1 file changed +1 -1
contrib/fast-import/git-p4
+1 -1
@@ -1142,7 +1142,7 @@ class P4Sync(Command):
1142
1143 s = ''
1144 for (key, val) in self.users.items():
1145 - s += "%s\t%s\n" % (key, val)
1145 + s += "%s\t%s\n" % (key.expandtabs(1), val.expandtabs(1))
1146
1147 open(self.getUserCacheFilename(), "wb").write(s)
1148 self.userMapFromPerforceServer = True