Skip to content

Support configurable Git config search path for Rugged

Stan Hu requested to merge sh-add-git-search-path into master

This commit adds an optional rugged_git_config_search_path parameter for gitaly-ruby.

By default, Rugged searches inside /etc/gitconfig instead of /opt/gitlab/embedded/etc/gitconfig for system-wide options unless the Rugged::Settings['search_path_system'] is set.

This means that important options such as core.fsyncObjectFiles are not propagated to gitaly-ruby, which can result in data loss after servers are rebooted.

The command-line git doesn't have this issue because it uses the prefix compile-time option, but this isn't available in Rugged.

With this new parameter, package managers (e.g. Omnibus) can specify where the system gitconfig file should be.

Closes #2051 (closed)

Edited by GitLab Release Tools Bot

Merge request reports