mirror of
https://github.com/git/git
synced 2024-10-30 14:03:28 +00:00
Merge branch 'aj/p4-symlink-lose-nl'
* aj/p4-symlink-lose-nl: git-p4: Fix occasional truncation of symlink contents.
This commit is contained in:
commit
a62b071d5b
1 changed files with 6 additions and 2 deletions
|
@ -2180,9 +2180,13 @@ def streamOneP4File(self, file, contents):
|
|||
git_mode = "100755"
|
||||
if type_base == "symlink":
|
||||
git_mode = "120000"
|
||||
# p4 print on a symlink contains "target\n"; remove the newline
|
||||
# p4 print on a symlink sometimes contains "target\n";
|
||||
# if it does, remove the newline
|
||||
data = ''.join(contents)
|
||||
contents = [data[:-1]]
|
||||
if data[-1] == '\n':
|
||||
contents = [data[:-1]]
|
||||
else:
|
||||
contents = [data]
|
||||
|
||||
if type_base == "utf16":
|
||||
# p4 delivers different text in the python output to -G
|
||||
|
|
Loading…
Reference in a new issue