Skip to content

Commit

Permalink
Merge pull request #71 from thathoff/release-4.0.1
Browse files Browse the repository at this point in the history
Release 4.0.1
  • Loading branch information
thathoff authored Nov 17, 2020
2 parents 794e99c + c153b31 commit 379e8f9
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 4 deletions.
8 changes: 8 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,11 @@
<a name="4.0.1"></a>
# [4.0.1](https://github.com/thathoff/kirby-git-content/compare/v4.0.0...v4.0.1) (2020-11-17)

### Bugfixes
- Setting path to git binary and enabling windows mode works again (thanks to @therephil)
- Fix committing when Kirby user has no name (thanks to @qwerdee, fixes #57)


<a name="4.0.0"></a>
# [4.0.0](https://github.com/thathoff/kirby-git-content/compare/v3.0.3...v4.0.0) (2020-10-25)

Expand Down
8 changes: 4 additions & 4 deletions src/KirbyGitHelper.php
Original file line number Diff line number Diff line change
Expand Up @@ -44,16 +44,16 @@ private function initRepo()
$this->windowsMode = option('thathoff.git-content.windowsMode', false);

if ($this->windowsMode) {
Git::windows_mode();
Git::windowsMode();
}
if ($this->gitBin) {
Git::set_bin($this->gitBin);
Git::setBin($this->gitBin);
}

$this->repo = Git::open($this->repoPath);

if (!$this->repo->test_git()) {
throw new Exception('git could not be found or is not working properly. ' . Git::get_bin());
throw new Exception('git could not be found or is not working properly. ' . Git::getBin());
}
}

Expand Down Expand Up @@ -117,7 +117,7 @@ public function kirbyChange($action, $item, $url = '')

$author = null;
if ($user) {
$author = $user->name() . " <" . $user->email() . ">";
$author = $user->name()->or($user->email()) . " <" . $user->email() . ">";
}

$this->commit($this->commitMessage($action, $item, $url), $author);
Expand Down

0 comments on commit 379e8f9

Please sign in to comment.