mirror of
https://github.com/git/git
synced 2024-11-05 18:59:29 +00:00
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>
This commit is contained in:
parent
4551d03541
commit
b39c3612eb
1 changed files with 2 additions and 3 deletions
|
@ -967,9 +967,8 @@ class P4Sync(Command):
|
||||||
elif file["type"] == "symlink":
|
elif file["type"] == "symlink":
|
||||||
mode = "120000"
|
mode = "120000"
|
||||||
# p4 print on a symlink contains "target\n", so strip it off
|
# p4 print on a symlink contains "target\n", so strip it off
|
||||||
last = contents.pop()
|
data = ''.join(contents)
|
||||||
last = last[:-1]
|
contents = [data[:-1]]
|
||||||
contents.append(last)
|
|
||||||
|
|
||||||
if self.isWindows and file["type"].endswith("text"):
|
if self.isWindows and file["type"].endswith("text"):
|
||||||
mangled = []
|
mangled = []
|
||||||
|
|
Loading…
Reference in a new issue