diff options
author | Rubén Dávila <rdavila84@gmail.com> | 2016-01-14 16:38:37 -0500 |
---|---|---|
committer | Rubén Dávila <rdavila84@gmail.com> | 2016-01-14 16:47:55 -0500 |
commit | 6b9c730e91962a6d6343bcb7fc4dc75c99b41bde (patch) | |
tree | b9f7cafa96b131b6039e858e2c2503011551cfd6 /lib/gitlab/diff/file.rb | |
parent | 70bc322415b33a4789067b81387d30f1411c9091 (diff) | |
download | gitlab-ce-6b9c730e91962a6d6343bcb7fc4dc75c99b41bde.tar.gz |
More refactoring from last code review. #3945
* Use commit objects instead of IDs when generating diffs
* Use proper references when generating MR's source and target
* Update broken specs
Diffstat (limited to 'lib/gitlab/diff/file.rb')
-rw-r--r-- | lib/gitlab/diff/file.rb | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/lib/gitlab/diff/file.rb b/lib/gitlab/diff/file.rb index c1a6e16da5a..a6a7fc8ff4c 100644 --- a/lib/gitlab/diff/file.rb +++ b/lib/gitlab/diff/file.rb @@ -1,14 +1,13 @@ module Gitlab module Diff class File - attr_reader :diff, :repository, :new_ref, :old_ref + attr_reader :diff, :new_ref, :old_ref delegate :new_file, :deleted_file, :renamed_file, :old_path, :new_path, to: :diff, prefix: false - def initialize(diff, diff_refs, repository) + def initialize(diff, diff_refs) @diff = diff - @repository = repository @old_ref, @new_ref = diff_refs end |