Skip to content

Commit

Permalink
#1099: simplest solution to get git progress for large clones (#1107)
Browse files Browse the repository at this point in the history
  • Loading branch information
hohwille authored Apr 14, 2023
1 parent 6c293be commit edc7178
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 4 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -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].

Expand Down
14 changes: 10 additions & 4 deletions scripts/src/main/resources/scripts/functions
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down Expand Up @@ -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 ."
Expand Down

0 comments on commit edc7178

Please sign in to comment.