Use reflog to calculate diff and allow 'git://' repo addresses (#198)

* use reflog instead of ORIG_HEAD to get the changes

* Allow git:// URLS too

Requiring url in repo only allows for https addresses

* trying to fix the tests and regex match

* fix lint
This commit is contained in:
Delio Castillo
2017-11-14 03:36:13 -07:00
committed by Pascal Vizeli
parent fcb9a37c78
commit c077c9fb8d
2 changed files with 3 additions and 3 deletions

View File

@@ -43,7 +43,7 @@ while true; do
# Enable autorestart of homeassistant
if [ "$AUTO_RESTART" == "true" ]; then
changed_files="$(git diff-tree -r --name-only --no-commit-id ORIG_HEAD HEAD)"
changed_files="$(git diff-tree -r --name-only --no-commit-id 'HEAD@{1}' HEAD)"
# Files have changed & check config
if [ ! -z "$changed_files" ]; then