Skip to content

Commit

Permalink
Add support for commondir file in .git dir
Browse files Browse the repository at this point in the history
- See : https://git-scm.com/docs/gitrepository-layout/2.5.1
- See : https://git-scm.com/docs/gitrepository-layout
Closes: #14391

Signed-off-by: William Desportes <williamdes@wdes.fr>
  • Loading branch information
williamdes committed Jun 11, 2018
1 parent 86fcc46 commit 13e34b4
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions libraries/classes/Config.php
Expand Up @@ -436,6 +436,10 @@ public function checkGitRevision(): void
return;
}

if ($common_dir_contents = @file_get_contents($git_folder . '/commondir')) {
$git_folder = $git_folder.DIRECTORY_SEPARATOR.trim($common_dir_contents);
}

$branch = false;
// are we on any branch?
if (strstr($ref_head, '/')) {
Expand Down

0 comments on commit 13e34b4

Please sign in to comment.