Skip to content

Commit 59f3dc2

Browse files
More work on branch-specific PHP-CS-Fixer cache files
1 parent 5bb4a31 commit 59f3dc2

File tree

2 files changed

+2
-6
lines changed

2 files changed

+2
-6
lines changed

.gitignore

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414

1515
# PHP-CS-Fixer
1616
/.php-cs-fixer.php
17-
/.php-cs-fixer.cache*
17+
/.php-cs-fixer.cache
1818

1919
# Psalm
2020
/.psalm/cache

.php-cs-fixer.dist.php

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -341,10 +341,6 @@
341341
'whitespace_after_comma_in_array' => true,
342342
]);
343343

344-
$branch = @trim((string) @shell_exec('git rev-parse --abbrev-ref HEAD'));
345-
346-
if (!empty($branch)) {
347-
$config->setCacheFile(__DIR__ . '/.php-cs-fixer.cache.' . $branch);
348-
}
344+
$config->setCacheFile(__DIR__ . '/.php-cs-fixer.cache/' . sha1(@trim((string) @shell_exec('git rev-parse --abbrev-ref HEAD'))));
349345

350346
return $config;

0 commit comments

Comments
 (0)