diff --git a/plugins/gogs/hook/commit.tpl b/plugins/gogs/hook/commit.tpl index 8c7631b66..bd94d2093 100755 --- a/plugins/gogs/hook/commit.tpl +++ b/plugins/gogs/hook/commit.tpl @@ -16,7 +16,9 @@ git config --global pull.rebase false if [ ! -d $GIT_PROJECT_DIR ];then mkdir -p $GIT_USER_DIR && cd $GIT_USER_DIR git clone $GITADDR --branch main - # git clone $GITADDR + if [ "$?" != "0" ];then + git clone $GITADDR + fi fi unset GIT_DIR