Fix gitaly-ruby not starting on case-sensitive filesystems
When gitaly-ruby is used on a case-sensitive filesystem, the
require_relative
calls depend on substitutions based on the
working directory of ruby/lib/gitlab/git.rb
. For example, suppose /Code/gitaly/ruby
were used:
-
__dir__
returns/code/gitaly/ruby
(ifcd /code
is run to set the working directory) -
Dir.glob
returns files prefixed by/Code/gitaly/ruby/
The require_relative
call in git.rb
attempts to strip the directory
name from the files returned in step 2, but due to the mismatch the
substitution failed. This prevented gitaly-ruby from starting.
To fix this, we use the canonical name of the directory by calling
Dir.glob
on that path. Under the hood, Dir.glob
makes a system call
to readdir()
to extract this name.
Closes #2538 (closed)
Edited by GitLab Release Tools Bot