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
#14391
Cherry-picked-from: 13e34b4
Signed-off-by: William Desportes <williamdes@wdes.fr>
  • Loading branch information
williamdes committed Dec 21, 2018
1 parent d7bea5c commit 1ead268
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions libraries/classes/Config.php
Expand Up @@ -403,6 +403,10 @@ public function checkGitRevision()
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 1ead268

Please sign in to comment.