Skip to content
Snippets Groups Projects
Commit 7b18c424 authored by Jacob Vosmaer (GitLab)'s avatar Jacob Vosmaer (GitLab)
Browse files

Remove unused (?) code

parent 0d52e59d
No related branches found
No related tags found
No related merge requests found
Loading
Loading
@@ -79,13 +79,6 @@ module Gitlab
@new_content_sha = refs&.head_sha
end
 
def new_content_commit
return @new_content_commit if defined?(@new_content_commit)
sha = new_content_commit
@new_content_commit = repository.commit(sha) if sha
end
def old_content_sha
return if new_file?
return @old_content_sha if defined?(@old_content_sha)
Loading
Loading
@@ -94,13 +87,6 @@ module Gitlab
@old_content_sha = refs&.base_sha
end
 
def old_content_commit
return @old_content_commit if defined?(@old_content_commit)
sha = old_content_sha
@old_content_commit = repository.commit(sha) if sha
end
def new_blob
return @new_blob if defined?(@new_blob)
 
Loading
Loading
@@ -123,10 +109,6 @@ module Gitlab
new_content_sha || old_content_sha
end
 
def content_commit
new_content_commit || old_content_commit
end
def blob
new_blob || old_blob
end
Loading
Loading
Loading
Loading
@@ -47,14 +47,6 @@ describe Gitlab::Diff::File do
end
end
 
describe '#old_content_commit' do
it 'returns base commit' do
old_content_commit = diff_file.old_content_commit
expect(old_content_commit.id).to eq('6f6d7e7ed97bb5f0054f2b1df789b39ca89b6ff9')
end
end
describe '#old_blob' do
it 'returns blob of commit of base commit' do
old_data = diff_file.old_blob.data
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment