Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
1
Merge Requests
1
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
gitlab-ce
Commits
7b18c424
Commit
7b18c424
authored
Jul 31, 2017
by
Jacob Vosmaer
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Remove unused (?) code
parent
0d52e59d
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
0 additions
and
26 deletions
+0
-26
lib/gitlab/diff/file.rb
lib/gitlab/diff/file.rb
+0
-18
spec/lib/gitlab/diff/file_spec.rb
spec/lib/gitlab/diff/file_spec.rb
+0
-8
No files found.
lib/gitlab/diff/file.rb
View file @
7b18c424
...
...
@@ -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
)
...
...
@@ -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
)
...
...
@@ -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
...
...
spec/lib/gitlab/diff/file_spec.rb
View file @
7b18c424
...
...
@@ -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
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment