Skip to content

Commit

Permalink
git-p4: fix bug in symlink handling
Browse files Browse the repository at this point in the history
Fix inadvertent breakage from b932705 (git-p4: stream from perforce to
speed up clones, 2009-07-30) in the code that strips the trailing '\n'
from p4 print on a symlink. (In practice, contents is of the form
['target\n', ''].)

Signed-off-by: Evan Powers <evan.powers@gmail.com>
Acked-by: Pete Wyckoff <pw@padd.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
  • Loading branch information
Evan Powers authored and Junio C Hamano committed Feb 20, 2010
1 parent 4551d03 commit b39c361
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions contrib/fast-import/git-p4
Original file line number Diff line number Diff line change
Expand Up @@ -967,9 +967,8 @@ class P4Sync(Command):
elif file["type"] == "symlink":
mode = "120000"
# p4 print on a symlink contains "target\n", so strip it off
last = contents.pop()
last = last[:-1]
contents.append(last)
data = ''.join(contents)
contents = [data[:-1]]

if self.isWindows and file["type"].endswith("text"):
mangled = []
Expand Down

0 comments on commit b39c361

Please sign in to comment.