summaryrefslogtreecommitdiffstats
path: root/org.eclipse.jgit.test
diff options
context:
space:
mode:
authorThomas Wolf <thomas.wolf@paranor.ch>2020-06-19 15:29:57 +0200
committerThomas Wolf <thomas.wolf@paranor.ch>2020-07-26 15:38:48 -0400
commit9fe54061197c42faedc9417bdc70797681aa06d6 (patch)
treee6886145fe838a9656e2deab48dc85ce7063dab9 /org.eclipse.jgit.test
parent097f01bfb65dd8f7b3d562bbd1713ecf4be5675e (diff)
downloadjgit-9fe54061197c42faedc9417bdc70797681aa06d6.tar.gz
jgit-9fe54061197c42faedc9417bdc70797681aa06d6.zip
FS_POSIX: avoid prompt to install the XCode tools on OS X
OS X ships with a default /usr/bin/git that is just a wrapper that at run-time delegates to the selected XCode toolchain, and that prompts the user to install the XCode command line tools if not already installed. This is annoying for people who don't want to do so, since they'll be prompted on each Eclipse start. Also, since on OS X the $PATH for applications started via the GUI is not the same as the $PATH as set via the shell profile, just using /usr/bin/git (which will normally be found when JGit runs inside Eclipse) may give slightly surprising results if the user has installed a non-Apple git and changed his $PATH in the shell such that the non-Apple git is used in the shell. (For instance by placing /usr/local/bin earlier on the path.) Eclipse and the shell will use different git executables, and thus different git system configs. Therefore, try to find git via bash --login -c 'which git' not only if we couldn't find it on $PATH but also if we found the default git /usr/bin/git. If that finds some other git, use that. If the bash approach also finds /usr/bin/git, double check via xcode-select -p that an XCode git is present. If not, assume there is no git installed, and work without any system config. Bug: 564372 Change-Id: Ie9d010ebd9437a491ba5d92b4ffd1860c203f8ca Signed-off-by: Thomas Wolf <thomas.wolf@paranor.ch>
Diffstat (limited to 'org.eclipse.jgit.test')
0 files changed, 0 insertions, 0 deletions