File tree Expand file tree Collapse file tree 3 files changed +6
-6
lines changed Expand file tree Collapse file tree 3 files changed +6
-6
lines changed Original file line number Diff line number Diff line change @@ -65,7 +65,7 @@ if ($return !== 0) {
6565/**
6666 * Check if something changed
6767 */
68- $ output = call ('git diff --numstat src/ ' );
68+ $ output = call ('git diff --numstat -- src/ ' );
6969
7070if (empty ($ output )) {
7171 console_log ('Nothing changed. ' );
@@ -98,7 +98,7 @@ foreach ($output as $line) {
9898 continue ;
9999 }
100100
101- $ fileChanges = call ('git diff --no-color -U0 ' .escapeshellarg ($ file ));
101+ $ fileChanges = call ('git diff --no-color -U0 -- ' .escapeshellarg ($ file ));
102102 foreach ($ fileChanges as $ lineChange ) {
103103 if (!$ lineChange ) {
104104 continue ;
Original file line number Diff line number Diff line change 9797 echo "###################################################"
9898 echo ""
9999
100- git diff src
100+ git diff -- src
101101
102102 exit 1
103103 fi
Original file line number Diff line number Diff line change @@ -198,8 +198,8 @@ static function ($branch) {
198198 });
199199
200200 $ output = array_merge (
201- self ::call ('git diff --numstat HEAD src/ ' ),
202- self ::call ('git diff --numstat ' . $ branches [0 ] . '...HEAD src/ ' )
201+ self ::call ('git diff --numstat HEAD -- src/ ' ),
202+ self ::call ('git diff --numstat ' . $ branches [0 ] . '...HEAD -- src/ ' )
203203 );
204204
205205 $ changedServices = [];
@@ -250,7 +250,7 @@ static function ($branch) {
250250
251251 $ isCommentOnly = true ;
252252 foreach ($ changedFiles as $ changedFile ) {
253- $ changedLines = self ::call ('git diff --no-color -U0 ' . escapeshellarg ($ changesService ['base ' ] . $ changedFile ));
253+ $ changedLines = self ::call ('git diff --no-color -U0 -- ' . escapeshellarg ($ changesService ['base ' ] . $ changedFile ));
254254 foreach ($ changedLines as $ changedLine ) {
255255 if (!$ changedLine ) {
256256 continue ;
You can’t perform that action at this time.
0 commit comments