statamic / spock

Automatically perform git commits, pushes, and other cli actions when Statamic content changes
95 stars 16 forks source link

Spock logs errors if entires are sorted by date #43

Open Jokedos123 opened 4 years ago

Jokedos123 commented 4 years ago

Hey! I have collection in statamic which is sorted by date so they are prefixed with date string. When spock is checking the affectedPaths() while adding to git, it also finds the path without the date string prefix, which does not exist anymore and therefore spock logs following error:

Command: git add '.../site/content/collections/blog-posts/foobar.md' Output: No output Error: fatal: pathspec '.../site/content/collections/blog-posts/foobar.md' did not match any files

but it also correctly adds the file which is called 2019-10-03.foobar.md to git, but it's just problematic to have false positives while handling errors.

fitzage commented 4 years ago

This is what I came to report.