Skip to content

Catch Error when working tree is clean #84

@graphichavoc

Description

@graphichavoc

Been using kirby-git-content successfully on a bunch of sites without problems (thanks a lot for creating this useful plugin! 🙏 )

But on this one I set up git lfs for larger files and I get git error messages like the following when reordering pages in the panel (Other operations seem to be fine). The reordered content is committed and gets pushed, but the error leaves me with an uneasy feeling and is distracting for my panel users (I could of course turn of error display, but then I wouldn't be able to diagnose if real issues should arise).

Screenshot 2021-10-06 at 21 03 35

Kirby config.php extract

'thathoff' => [
    'git-content' => [
      // use the main git repo at the root of the project
      // (instead of the default, a separate git repo for "content")
      'path' => realpath(__DIR__ . '/../../'),
      // silent git errors on production systems
      // so normal users aren’t confused by cryptic messages
      'displayErrors' => true,
      // Push to GitHub after every change. NOTE: makes things a little slower
      // but is easier to maintain for us than a separate cron job
      'push'=> true,
    ],

.gitattributes

content/**/*.png filter=lfs diff=lfs merge=lfs -text
content/**/*.jpg filter=lfs diff=lfs merge=lfs -text
content/**/*.pdf filter=lfs diff=lfs merge=lfs -text
content/**/*.tif filter=lfs diff=lfs merge=lfs -text
content/**/*.tiff filter=lfs diff=lfs merge=lfs -text
content/**/*.jpeg filter=lfs diff=lfs merge=lfs -text
content/**/*.psd filter=lfs diff=lfs merge=lfs -text
content/**/*.mp4 filter=lfs diff=lfs merge=lfs -text
content/**/*.mp3 filter=lfs diff=lfs merge=lfs -text
content/**/*.mov filter=lfs diff=lfs merge=lfs -text
content/**/*.m4a filter=lfs diff=lfs merge=lfs -text
content/**/*.m4p filter=lfs diff=lfs merge=lfs -text
content/**/*.ogg filter=lfs diff=lfs merge=lfs -text

Metadata

Metadata

Assignees

Labels

No labels
No labels

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions