File tree Expand file tree Collapse file tree 2 files changed +29
-7
lines changed Expand file tree Collapse file tree 2 files changed +29
-7
lines changed Original file line number Diff line number Diff line change 3
3
set -ex
4
4
5
5
# version based on current master 3cb3f7ce6bb8b910f5a41ea1887b1faceba6a7d7
6
- # plus https://github.com/chrisboulton/php-diff/pull/50
6
+ # plus pull requests:
7
+ # - https://github.com/chrisboulton/php-diff/pull/50
8
+ # - https://github.com/chrisboulton/php-diff/pull/51
9
+
7
10
git clone https://github.com/chrisboulton/php-diff.git
8
11
9
12
cd php-diff
10
13
11
- git fetch origin pull/50/head:pr
12
- git checkout a9f124f81a9436138879e56157c6cced52a6d95b
13
- git show -s
14
+ # master
15
+ git checkout 3cb3f7ce6bb8b910f5a41ea1887b1faceba6a7d7
16
+
17
+ # PR #50
18
+ git fetch origin pull/50/head:pr-50
19
+ git cherry-pick a9f124f81a9436138879e56157c6cced52a6d95b
20
+
21
+ # PR #51
22
+ git fetch origin pull/51/head:pr-51
23
+ git cherry-pick cb0d0781bcc6b0ae39d73715c659a6d2717d28e1
24
+
25
+ git log -4
14
26
15
27
rm -rf .git
16
28
rm -rf .gitignore
17
29
rm -rf composer.json
18
30
rm -rf example tests phpunit.xml
19
31
cd ..
32
+
33
+ echo " Now you can run:"
34
+ echo " rsync -av php-diff/ ./ --delete --exclude=SOURCE --exclude=php-diff/"
35
+ echo " and:"
36
+ echo " rm -rf php-diff/"
Original file line number Diff line number Diff line change @@ -190,9 +190,14 @@ protected function formatLines($lines)
190
190
*/
191
191
private function fixSpaces (array $ matches )
192
192
{
193
- $ spaces = $ matches [1 ];
194
- $ count = strlen ($ spaces );
195
- if ($ count == 0 ) {
193
+ $ count = 0 ;
194
+
195
+ if (count ($ matches ) > 1 ) {
196
+ $ spaces = $ matches [1 ];
197
+ $ count = strlen ($ spaces );
198
+ }
199
+
200
+ if ($ count == 0 ) {
196
201
return '' ;
197
202
}
198
203
You can’t perform that action at this time.
0 commit comments