git.cweiske.de
/
phorkie.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Fix error with git 2.25.1 complaining about missing committer
[phorkie.git]
/
src
/
phorkie
/
Repositories.php
diff --git
a/src/phorkie/Repositories.php
b/src/phorkie/Repositories.php
index e0a3985aa461a73fa4be139b5862857fb11744f6..c6059961a3f6ed2b2124276729698ab4ef46fd37 100644
(file)
--- a/
src/phorkie/Repositories.php
+++ b/
src/phorkie/Repositories.php
@@
-16,14
+16,16
@@
class Repositories
{
chdir($this->gitDir);
$dirs = glob('*.git', GLOB_ONLYDIR);
{
chdir($this->gitDir);
$dirs = glob('*.git', GLOB_ONLYDIR);
- array_walk(
- $dirs,
- function ($dir) {
- return substr($dir, 0, -4);
- }
- );
+ foreach ($dirs as $key => $dir) {
+ $dirs[$key] = substr($dir, 0, -4);
+ }
sort($dirs, SORT_NUMERIC);
sort($dirs, SORT_NUMERIC);
- $n = end($dirs) + 1;
+
+ if ($GLOBALS['phorkie']['cfg']['randomIds']) {
+ $n = end($dirs) + mt_rand(65536, 16777216);
+ } else {
+ $n = end($dirs) + 1;
+ }
chdir($this->workDir);
$dir = $this->workDir . '/' . $n . '/';
chdir($this->workDir);
$dir = $this->workDir . '/' . $n . '/';