Skip to content

Commit

Permalink
git-p4: remove tabs from usermap file
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Pete Wyckoff authored and Junio C Hamano committed Mar 8, 2009
1 parent ca31f0b commit 3b16739
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion contrib/fast-import/git-p4
Original file line number Diff line number Diff line change
Expand Up @@ -1142,7 +1142,7 @@ class P4Sync(Command):

s = ''
for (key, val) in self.users.items():
s += "%s\t%s\n" % (key, val)
s += "%s\t%s\n" % (key.expandtabs(1), val.expandtabs(1))

open(self.getUserCacheFilename(), "wb").write(s)
self.userMapFromPerforceServer = True
Expand Down

0 comments on commit 3b16739

Please sign in to comment.