You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@lucene.apache.org by dw...@apache.org on 2022/11/21 16:49:03 UTC

[lucene] branch main updated: jgit shouldn't fork git to find out the config dir (#11959)

This is an automated email from the ASF dual-hosted git repository.

dweiss pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/lucene.git


The following commit(s) were added to refs/heads/main by this push:
     new fa0031bde59 jgit shouldn't fork git to find out the config dir (#11959)
fa0031bde59 is described below

commit fa0031bde59f25644b0bc236987d7e0ee2050a1c
Author: Dawid Weiss <da...@carrotsearch.com>
AuthorDate: Mon Nov 21 17:48:57 2022 +0100

    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 <rm...@apache.org>
---
 gradlew     | 3 +++
 gradlew.bat | 3 +++
 2 files changed, 6 insertions(+)

diff --git a/gradlew b/gradlew
index 20d5bf31c34..adc1eb18c5b 100755
--- a/gradlew
+++ b/gradlew
@@ -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"
 
diff --git a/gradlew.bat b/gradlew.bat
index 4e4ea743a49..12ee46e8f71 100644
--- a/gradlew.bat
+++ b/gradlew.bat
@@ -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% %*