When the content folder does not contain a valid Git repo, it crashes.
The reason is in the Autogit class constructor: It executes two commands that should only be executed if there is a valid Git repo. These commands do not catch any Exceptions. Thus the site crashes.
Suggested resolution: Move these two lines to autogit.php after the isRepo check just like this:
if (autogit()->isRepo()) {
autogit()->setBranch();
autogit()->setUser(site()->user());
...
Background: I use Docker instances to run Kirby for dev & production purposes. For the dev environment I want to disable kirby-autogit features. Therefore the content directory is not a valid git repository.
When the content folder does not contain a valid Git repo, it crashes.
The reason is in the Autogit class constructor: It executes two commands that should only be executed if there is a valid Git repo. These commands do not catch any Exceptions. Thus the site crashes.
Suggested resolution: Move these two lines to autogit.php after the isRepo check just like this:
Background: I use Docker instances to run Kirby for dev & production purposes. For the dev environment I want to disable kirby-autogit features. Therefore the content directory is not a valid git repository.