aboutsummaryrefslogtreecommitdiff
path: root/contrib
diff options
context:
space:
mode:
authorEvan Powers <evan.powers@gmail.com>2010-02-16 00:44:08 -0800
committerJunio C Hamano <gitster@pobox.com>2010-02-20 08:38:21 -0800
commitb39c3612eb443e77bd04d645578e1155988c6dde (patch)
tree784bad4b997af5898d30c0d8201deddbbd538f4e /contrib
parent4551d03541e5eec411bb367f7967ff933d176df4 (diff)
downloadgit-b39c3612eb443e77bd04d645578e1155988c6dde.tar.gz
git-b39c3612eb443e77bd04d645578e1155988c6dde.tar.xz
git-p4: fix bug in symlink handling
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>
Diffstat (limited to 'contrib')
-rwxr-xr-xcontrib/fast-import/git-p45
1 files changed, 2 insertions, 3 deletions
diff --git a/contrib/fast-import/git-p4 b/contrib/fast-import/git-p4
index e7c48144e..cd96c6f81 100755
--- a/contrib/fast-import/git-p4
+++ b/contrib/fast-import/git-p4
@@ -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 = []