Date: | 2011-06-01 17:48:38 (13 years 10 months ago) |
Author: | Thomas Keller |
Branch: | develop, feature.content-md5, feature.diff-whitespace, feature.issue-of-others, feature.issue-summary, feature.search-filter, feature.webrepos, feature.wiki-default-page, release-1.2, release-1.3 |
Commit: | 20c3f14cc88d2245b9ba04ab6dd858e7a2f66f81 |
Parents: |
80313c88c86d1b9a83b4734ddb58959a88879854
|
Message: | git and hg diff views did not show empty context lines, a regression
from the commit(s) from issue 633. The diff parser assumed a
properly formatted diff that denotes empty context lines with a
single space in the first column. This single space however was
missing, because the hg and git backends got the diff through PHP's
exec() function and this returns already line-splitted output, but -
and this is the actual problem - removes trailing whitespace at the
end of each line, essentially making " \n" only
"\n". When splitting this string now again with
PREG_SPLIT_NO_EMPTY the empty line was completely lost in the diff
output.
To make it clear that an empty line does not mark a context line now, but
should stop the diff parsing, the Diff parser now also defaults to 'false'
as line type.
This commit fixes issue 688. |
Changes: |
|
File differences
NEWS.mdtext |
14 | 14 |
15 | 15 |
16 | 16 |
| 17 |
17 | 18 |
18 | 19 |
19 | 20 |
|
|
src/IDF/Diff.php |
101 | 101 |
102 | 102 |
103 | 103 |
104 | |
| 104 |
105 | 105 |
106 | 106 |
107 | 107 |
|
|
src/IDF/Scm.php |
88 | 88 |
89 | 89 |
90 | 90 |
91 | |
| 91 |
| 92 |
| 93 |
| 94 |
| 95 |
92 | 96 |
93 | 97 |
94 | 98 |
95 | 99 |
96 | 100 |
97 | |
98 | 101 |
99 | 102 |
100 | 103 |
| 104 |
101 | 105 |
102 | |
| 106 |
| 107 |
| 108 |
| 109 |
| 110 |
| 111 |
| 112 |
| 113 |
| 114 |
| 115 |
| 116 |
| 117 |
| 118 |
103 | 119 |
104 | 120 |
105 | 121 |
106 | |
107 | 122 |
108 | 123 |
109 | 124 |
|
|
Download the corresponding diff file