diff options
author | Douwe Maan <douwe@selenight.nl> | 2017-02-22 20:51:46 +0300 |
---|---|---|
committer | Douwe Maan <douwe@selenight.nl> | 2017-02-23 18:32:42 +0300 |
commit | 75f5fa997de148c9bc0e5bd6e6f6050526a0b164 (patch) | |
tree | e2fd6db5b1190817c062a8df20018dd00be68ce0 /lib/gitlab/git/repository.rb | |
parent | 7d4b52b27dcbe30d85d4fad27e983cee51cf6677 (diff) |
Enable Rails/Delegate
Diffstat (limited to 'lib/gitlab/git/repository.rb')
-rw-r--r-- | lib/gitlab/git/repository.rb | 14 |
1 files changed, 4 insertions, 10 deletions
diff --git a/lib/gitlab/git/repository.rb b/lib/gitlab/git/repository.rb index 7068e68a855..e1fabff4e29 100644 --- a/lib/gitlab/git/repository.rb +++ b/lib/gitlab/git/repository.rb @@ -162,13 +162,9 @@ module Gitlab !empty? end - def empty? - rugged.empty? - end - - def bare? - rugged.bare? - end + delegate :empty?, + :bare?, + to: :rugged def repo_exists? !!rugged @@ -565,9 +561,7 @@ module Gitlab # will trigger a +:mixed+ reset and the working directory will be # replaced with the content of the index. (Untracked and ignored files # will be left alone) - def reset(ref, reset_type) - rugged.reset(ref, reset_type) - end + delegate :reset, to: :rugged # Mimic the `git clean` command and recursively delete untracked files. # Valid keys that can be passed in the +options+ hash are: |