Browse Source
This avoids polluting hand-crafted user level config with auto-configured options which might disturb in environments where the user level config is replicated between different machines. Add a jgit config as parent of the system level config. Persist measured timestamp resolutions always in this jgit config and read it via the user global config. This has the effect that auto-configured timestamp resolution will be used by default and can be overridden in either the system level or user level config. Store the jgit config under the XDG_CONFIG_HOME directory following the XDG base directory specification [1] in order to ensure that we have write permissions to persist the file. This has the effect that each OS user will use its jgit config since they typically use different XDG_CONFIG_HOME directories. If the environment variable XDG_CONFIG_HOME is defined the jgit config file is located at $XDG_CONFIG_HOME/jgit/config otherwise the default is ~/.config/jgit/config. If you want to avoid redundant measurement for different OS users manually copy the values measured and auto-configured for one OS user to the system level git config. [1] https://wiki.archlinux.org/index.php/XDG_Base_Directory Bug: 551850 Change-Id: I0022bd40ae62f82e5b964c2ea25822eb55d94687 Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>stable-5.5
Matthias Sohn
5 years ago
9 changed files with 181 additions and 23 deletions
Loading…
Reference in new issue