Patch Set 1: I would prefer that you didn't submit this

looks good, but on my Mac I can't write the system wide configuration (the file didn't exist so far), egit tries to write it to /usr/local/git/etc/gitconfig as I compiled c-git locally. Shouldn't the system wide config end up in /etc/gitconfig ?

The mkdirs() in the first line of LockFile.lock fails silently (return value isn't checked) as this would require sudo-ing to gain root privileges. The createNewFile() on the next line then fails with an IOException :

java.io.IOException: No such file or directory
	at java.io.UnixFileSystem.createFileExclusively(Native Method)
	at java.io.File.createNewFile(File.java:883)
	at org.eclipse.jgit.storage.file.LockFile.lock(LockFile.java:126)
	at org.eclipse.jgit.storage.file.FileBasedConfig.save(FileBasedConfig.java:174)
	at org.eclipse.egit.ui.internal.preferences.ConfigurationEditorComponent.save(ConfigurationEditorComponent.java:130)
	at org.eclipse.egit.ui.internal.preferences.GlobalConfigurationPreferencePage.performOk(GlobalConfigurationPreferencePage.java:120)
...

If I create /usr/local/git/etc/gitconfig manually I still can't save system wide configuration from egit as it doesn't know how to sudo :

java.io.IOException: Permission denied
	at java.io.UnixFileSystem.createFileExclusively(Native Method)
	at java.io.File.createNewFile(File.java:883)
	at org.eclipse.jgit.storage.file.LockFile.lock(LockFile.java:126)
	at org.eclipse.jgit.storage.file.FileBasedConfig.save(FileBasedConfig.java:174)
	at org.eclipse.egit.ui.internal.preferences.ConfigurationEditorComponent.save(ConfigurationEditorComponent.java:130)
	at org.eclipse.egit.ui.internal.preferences.GlobalConfigurationPreferencePage.performOk(GlobalConfigurationPreferencePage.java:120)
	at org.eclipse.jface.preference.PreferencePage.performApply(PreferencePage.java:432)
...