jgit shouldn't fork git to find out the config dir (#11959)

* Windows part.

* jgit shouldn't fork git to find out the config dir (posix)

Co-authored-by: Robert Muir <rmuir@apache.org>
This commit is contained in:
Dawid Weiss 2022-11-21 17:48:57 +01:00 committed by GitHub
parent 332679886c
commit fa0031bde5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 6 additions and 0 deletions

3
gradlew vendored
View File

@ -209,6 +209,9 @@ save () {
}
APP_ARGS=$(save "$@")
# Prevent jgit from forking/searching git.exe
export GIT_CONFIG_NOSYSTEM=1
# Collect all arguments for the java command, following the shell quoting and substitution rules
eval set -- $JAVA_OPTS $GRADLE_OPTS "\"-Dorg.gradle.appname=$APP_BASE_NAME\"" -classpath "\"$CLASSPATH\"" org.gradle.wrapper.GradleWrapperMain $GRADLE_DAEMON_CTRL "$APP_ARGS"

3
gradlew.bat vendored
View File

@ -87,6 +87,9 @@ set CLASSPATH=%GRADLE_WRAPPER_JAR%
SET GRADLE_DAEMON_CTRL=
IF NOT EXIST "%DIRNAME%\gradle.properties" SET GRADLE_DAEMON_CTRL=--no-daemon
@rem Prevent jgit from forking/searching git.exe
SET GIT_CONFIG_NOSYSTEM=1
@rem Execute Gradle
"%JAVA_EXE%" %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %GRADLE_DAEMON_CTRL% %*