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 33set -ex
44
55# 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+
710git clone https://github.com/chrisboulton/php-diff.git
811
912cd php-diff
1013
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
1426
1527rm -rf .git
1628rm -rf .gitignore
1729rm -rf composer.json
1830rm -rf example tests phpunit.xml
1931cd ..
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)
190190 */
191191 private function fixSpaces (array $ matches )
192192 {
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 ) {
196201 return '' ;
197202 }
198203
You can’t perform that action at this time.
0 commit comments