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
ecbf3707
Commit
ecbf3707
authored
Jul 07, 2021
by
Robert May
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Use existing hash for cache key
parent
80dec92a
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
3 additions
and
4 deletions
+3
-4
app/models/compare.rb
app/models/compare.rb
+1
-1
spec/models/compare_spec.rb
spec/models/compare_spec.rb
+2
-3
No files found.
app/models/compare.rb
View file @
ecbf3707
...
...
@@ -26,7 +26,7 @@ class Compare
end
def
cache_key
[
@project
,
:compare
,
start_commit_sha
,
base_commit_sha
,
head_commit_sha
,
@straight
]
[
@project
,
:compare
,
diff_refs
.
hash
]
end
def
commits
...
...
spec/models/compare_spec.rb
View file @
ecbf3707
...
...
@@ -19,9 +19,8 @@ RSpec.describe Compare do
subject
{
compare
.
cache_key
}
it
{
is_expected
.
to
include
(
project
)
}
it
{
is_expected
.
to
include
(
start_commit
.
id
)
}
it
{
is_expected
.
to
include
(
head_commit
.
id
)
}
it
{
is_expected
.
to
include
(
compare
.
base_commit_sha
)
}
it
{
is_expected
.
to
include
(
:compare
)
}
it
{
is_expected
.
to
include
(
compare
.
diff_refs
.
hash
)
}
end
describe
'#start_commit'
do
...
...
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