Skip to content

Ensure user's gitconfig contains system's core options

Stan Hu requested to merge sh-populate-git-core-options-to-user-gitconfig into master

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.

To ensure that Rugged gets these options, we populate user's gitconfig file with the system's gitconfig file.

This is a workaround until we introduce support for configurable search paths inside gitaly-ruby (gitaly!1526 (merged)). This search path does not appear to be configurable via environment variables.

See gitaly#2051 (closed) for more details.

Edited by GitLab Release Tools Bot

Merge request reports