summaryrefslogtreecommitdiff
path: root/lib/gitlab/diff/file.rb
diff options
context:
space:
mode:
authorRubén Dávila <rdavila84@gmail.com>2016-01-14 16:38:37 -0500
committerRubén Dávila <rdavila84@gmail.com>2016-01-14 16:47:55 -0500
commit6b9c730e91962a6d6343bcb7fc4dc75c99b41bde (patch)
treeb9f7cafa96b131b6039e858e2c2503011551cfd6 /lib/gitlab/diff/file.rb
parent70bc322415b33a4789067b81387d30f1411c9091 (diff)
downloadgitlab-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.rb5
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