Add a check for unstaged changes when generating automated commits
Summary:
While this check is not particularly helpful when the automation runs
in production, this will help prevent blowing away changes by mistake when
testing this script locally.
It also turns out that the forced git checkout on master isn't really necessary anymore.
While land-patch.sh still assumes working on master, better separation of responsibilities
makes this script easier to test locally without specifying a given parent commit.
Test Plan:
COMMIT_TYPE=dummy ./automated-commits.sh ./patch-recipes/update-aur-version.sh bitcoin-abc # Still bails early since there was no change echo "" >> CMakeLists.txt COMMIT_TYPE=archive-release-notes ./automated-commits.sh # should error instead of blowing away the change
Reviewers: #bitcoin_abc, deadalnix
Reviewed By: #bitcoin_abc, deadalnix
Subscribers: deadalnix
Differential Revision: https://reviews.bitcoinabc.org/D7481