From edc717847503677e940b84bea4d1de972414f829 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rg=20Hohwiller?= Date: Fri, 14 Apr 2023 18:37:09 +0200 Subject: [PATCH] #1099: simplest solution to get git progress for large clones (#1107) --- CHANGELOG.asciidoc | 1 + scripts/src/main/resources/scripts/functions | 14 ++++++++++---- 2 files changed, 11 insertions(+), 4 deletions(-) diff --git a/CHANGELOG.asciidoc b/CHANGELOG.asciidoc index 8564389a8..520b68177 100644 --- a/CHANGELOG.asciidoc +++ b/CHANGELOG.asciidoc @@ -12,6 +12,7 @@ Release with new features and bugfixes: * https://github.com/devonfw/ide/issues/1039[#1039]: Add support for Kotlin. * https://github.com/devonfw/ide/issues/1080[#1080]: auto-configure IntelliJ core settings * https://github.com/devonfw/ide/issues/1104[#1104]: IntelliJ plugin installation not working +* https://github.com/devonfw/ide/issues/1099[#1099]: progress output when project is cloned The full list of changes for this release can be found in https://github.com/devonfw/ide/milestone/43?closed=1[milestone 2023.04.001]. diff --git a/scripts/src/main/resources/scripts/functions b/scripts/src/main/resources/scripts/functions index ddcaee173..1d0764507 100644 --- a/scripts/src/main/resources/scripts/functions +++ b/scripts/src/main/resources/scripts/functions @@ -1154,13 +1154,13 @@ function doGitPullOrClone() { local dir="${1}" local url="${2}" local git_opts="" - if ! doIsDebug - then - git_opts="-q" - fi if [ -d "${dir}/.git" ] then pushd "${dir}" > /dev/null || exit 255 + if ! doIsDebug + then + git_opts="-q" + fi local remotes remotes="$(git remote)" local message="Can not update git repository: ${dir}\n" @@ -1197,6 +1197,12 @@ function doGitPullOrClone() { else mkdir -p "${dir}" pushd "${dir}" > /dev/null || exit 255 + if doIsQuiet + then + git_opts="-q" + else + doEcho "Cloning git repositroy from ${url}" + fi local branch="${url/*#/}" url="${url%#*}" doRunCommand "git clone ${git_opts} --recursive '${url}' --config core.autocrlf=false ."