diff options
author | Thomas Wolf <thomas.wolf@paranor.ch> | 2021-11-19 19:15:46 +0100 |
---|---|---|
committer | Matthias Sohn <matthias.sohn@sap.com> | 2021-11-22 21:17:14 +0100 |
commit | 9446e62733da5005be1d5182f0dce759a3052d4a (patch) | |
tree | c7830596eb32d232e2b9ea1d365753dd128c928f /org.eclipse.jgit.ant.test/pom.xml | |
parent | 2a8b9871b9ca6a3b1d10c23c12f67de5c20e0ee7 (diff) | |
download | jgit-9446e62733da5005be1d5182f0dce759a3052d4a.tar.gz jgit-9446e62733da5005be1d5182f0dce759a3052d4a.zip |
Better git system config finding
We've used "GIT_EDITOR=edit git config --system --edit" to determine
the location of the git system config for a long time. But git 2.34.0
always expects this command to have a tty, but there isn't one when
called from Java. If there isn't one, the Java process may get a
SIGTTOU from the child process and hangs.
Arguably it's a bug in C git 2.34.0 to unconditionally assume there
was a tty. But JGit needs a fix *now*, otherwise any application using
JGit will lock up if git 2.34.0 is installed on the machine.
Therefore, use a different approach if the C git found is 2.8.0 or
newer: parse the output of
git config --system --show-origin --list -z
"--show-origin" exists since git 2.8.0; it prefixes the values with
the file name of the config file they come from, which is the system
config file for this command. (This works even if the first item in
the system config is an include.)
Bug: 577358
Change-Id: I3ef170ed3f488f63c3501468303119319b03575d
Signed-off-by: Thomas Wolf <thomas.wolf@paranor.ch>
Diffstat (limited to 'org.eclipse.jgit.ant.test/pom.xml')
0 files changed, 0 insertions, 0 deletions