From ca6cfad68e60831c7517bc06902b1e8d66f04998 Mon Sep 17 00:00:00 2001 From: Filippo Ledda Date: Tue, 26 Mar 2024 10:58:09 +0100 Subject: [PATCH] #921 fix github error on commit --- applications/workspaces/tasks/github-copy/run.sh | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/applications/workspaces/tasks/github-copy/run.sh b/applications/workspaces/tasks/github-copy/run.sh index b1fba282..351c5c2d 100755 --- a/applications/workspaces/tasks/github-copy/run.sh +++ b/applications/workspaces/tasks/github-copy/run.sh @@ -44,8 +44,9 @@ if [ ! -d "${download_path}/.git" ]; then # create new branch, commit there echo "Git: checking out new branch and committing" git checkout -b "$timestamp" - git commit -m "osbv2: checked out repository" - + echo "checked out branch $timestamp" + git diff-index --quiet HEAD || git commit -ma "osbv2: checked out repository" + # unset username: ensure that user has to set it manually if they # do anything with git in the repo echo "Git: unsetting user/email for repo"