Log update for changed blocks
This commit is contained in:
@@ -41,7 +41,7 @@ if [ -n "${changes}" ]; then
|
||||
local_changes=$("${GIT_COMMAND_BASE[@]}" "-C" "${GIT_REPOSITORY_FOLDER}" "diff" "--quiet");
|
||||
cached_changed=$("${GIT_COMMAND_BASE[@]}" "-C" "${GIT_REPOSITORY_FOLDER}" "diff" "--quiet" "--cached");
|
||||
if $local_changes || $cached_changed; then
|
||||
echo "[$(date +"%Y-%m-%d %H:%M:%S")] [${unique_id}] [!] Local or cached changes detected, creating backup branch and resetting changes" &>> "$LOG_FILE";
|
||||
echo "[$(date +"%Y-%m-%d %H:%M:%S")] [${unique_id}] [!] Local ($local_changes) or cached ($cached_changed) changes detected, creating backup branch and resetting changes" &>> "$LOG_FILE";
|
||||
GIT_COMMAND=("${GIT_COMMAND_BASE[@]}" "-C" "${GIT_REPOSITORY_FOLDER}" "branch" "backup-$(date +%Y%m%d-%H%M%S)")
|
||||
"${GIT_COMMAND[@]}";
|
||||
# Reset everything
|
||||
|
||||
Reference in New Issue
Block a user