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
c8a8d13d
Commit
c8a8d13d
authored
Aug 01, 2017
by
Douwe Maan
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'remove-content-commit' into 'master'
Remove unused Gitlab::Diff code See merge request !13195
parents
07a4cf41
7b18c424
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 @
c8a8d13d
...
@@ -79,13 +79,6 @@ module Gitlab
...
@@ -79,13 +79,6 @@ module Gitlab
@new_content_sha
=
refs
&
.
head_sha
@new_content_sha
=
refs
&
.
head_sha
end
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
def
old_content_sha
return
if
new_file?
return
if
new_file?
return
@old_content_sha
if
defined?
(
@old_content_sha
)
return
@old_content_sha
if
defined?
(
@old_content_sha
)
...
@@ -94,13 +87,6 @@ module Gitlab
...
@@ -94,13 +87,6 @@ module Gitlab
@old_content_sha
=
refs
&
.
base_sha
@old_content_sha
=
refs
&
.
base_sha
end
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
def
new_blob
return
@new_blob
if
defined?
(
@new_blob
)
return
@new_blob
if
defined?
(
@new_blob
)
...
@@ -123,10 +109,6 @@ module Gitlab
...
@@ -123,10 +109,6 @@ module Gitlab
new_content_sha
||
old_content_sha
new_content_sha
||
old_content_sha
end
end
def
content_commit
new_content_commit
||
old_content_commit
end
def
blob
def
blob
new_blob
||
old_blob
new_blob
||
old_blob
end
end
...
...
spec/lib/gitlab/diff/file_spec.rb
View file @
c8a8d13d
...
@@ -47,14 +47,6 @@ describe Gitlab::Diff::File do
...
@@ -47,14 +47,6 @@ describe Gitlab::Diff::File do
end
end
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
describe
'#old_blob'
do
it
'returns blob of commit of base commit'
do
it
'returns blob of commit of base commit'
do
old_data
=
diff_file
.
old_blob
.
data
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