lib/gitlab_git/repository.rb in gitlab_git-7.2.4 vs lib/gitlab_git/repository.rb in gitlab_git-7.2.5

- old
+ new

@@ -754,12 +754,21 @@ end commits end - # Set the "core.autocrlf" config option to true for this repo. - def enable_autocrlf - rugged.config['core.autocrlf'] = true + AUTOCRLF_VALUES = { + "true" => true, + "false" => false, + "input" => :input + }.freeze + + def autocrlf + AUTOCRLF_VALUES[rugged.config['core.autocrlf']] + end + + def autocrlf=(value) + rugged.config['core.autocrlf'] = AUTOCRLF_VALUES.invert[value] end private # Get the content of a blob for a given commit. If the blob is a commit