Conditions | 2 |
Paths | 2 |
Total Lines | 16 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | <?php |
||
23 | public static function committedFiles() |
||
24 | { |
||
25 | $output = []; |
||
26 | $rc = 0; |
||
27 | |||
28 | exec('git rev-parse --verify HEAD 2> /dev/null', $output, $rc); |
||
29 | |||
30 | $against = '4b825dc642cb6eb9a060e54bf8d69288fbee4904'; |
||
31 | if (0 === $rc) { |
||
32 | $against = 'HEAD'; |
||
33 | } |
||
34 | |||
35 | exec("git diff-index --cached --name-status $against | egrep '^(A|M)' | awk '{print $2;}'", $output); |
||
36 | |||
37 | return $output; |
||
38 | } |
||
39 | |||
53 |