diff options
| author | Daniel Weipert <git@mail.dweipert.de> | 2026-06-16 23:17:11 +0200 |
|---|---|---|
| committer | Daniel Weipert <git@mail.dweipert.de> | 2026-06-16 23:17:11 +0200 |
| commit | 9a96ab50526ad21f507b755948d9e910251a3dac (patch) | |
| tree | 2db80a73f7156c565bdf19d532e59caa796ffbe1 | |
| parent | 1c9a90571a6712dc59acafc9719cabb0599b904d (diff) | |
| -rw-r--r-- | index.php | 15 |
1 files changed, 15 insertions, 0 deletions
@@ -15,6 +15,7 @@ function find_projects(string $path, array $projects = []): array { $directories = glob($path . "/{.[!.],}*", GLOB_ONLYDIR | GLOB_BRACE); if (array_search("$path/.git", $directories) !== false) { + app_log("Found $path"); $projects[] = $path; } else { @@ -24,6 +25,7 @@ function find_projects(string $path, array $projects = []): array { } if (count(array_intersect($scan, ["HEAD", "objects", "refs"])) == 3) { + app_log("Found $path"); $projects[] = $path; } else { @@ -46,10 +48,14 @@ $cache_parse_log = []; function parse_log(string $path): array { global $cache_parse_log; + app_log("Getting log at $path"); + if (isset($cache_parse_log[$path])) { return $cache_parse_log[$path]; } + app_log("Parsing log at $path"); + $proxy = md5(strval(microtime(true))); $process = proc_open( "git -C \"{$path}\" log " . "--pretty=format:'{{$proxy}commit{$proxy}: {$proxy}%H{$proxy}, {$proxy}author{$proxy}: {$proxy}%aN <%aE>{$proxy}, {$proxy}date{$proxy}: {$proxy}%ad{$proxy}, {$proxy}message{$proxy}: {$proxy}%B{$proxy}},'", @@ -81,6 +87,8 @@ function parse_log(string $path): array { * parse git status at $path */ function parse_status(string $path): array { + app_log("Parsing status at $path"); + $process = proc_open( "git -C \"{$path}\" status --porcelain=v2 --branch", [ @@ -232,6 +240,13 @@ function read_object_file(string $path, string $name): string ## + +function app_log(string $message): void +{ + error_log($message); +} + + /** * urlencode whole $url */ |
