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
b62cdc3c
Commit
b62cdc3c
authored
Dec 11, 2015
by
Tony Chu
Committed by
Rémy Coutable
Feb 08, 2016
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Actually use the `skip_merges` option in Repository#commits
parent
bce482a5
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
9 additions
and
1 deletion
+9
-1
CHANGELOG
CHANGELOG
+1
-0
app/models/repository.rb
app/models/repository.rb
+2
-1
spec/models/repository_spec.rb
spec/models/repository_spec.rb
+6
-0
No files found.
CHANGELOG
View file @
b62cdc3c
...
...
@@ -24,6 +24,7 @@ v 8.5.0 (unreleased)
- Update the ExternalIssue regex pattern (Blake Hitchcock)
- Optimized performance of finding issues to be closed by a merge request
- Revert "Add IP check against DNSBLs at account sign-up"
- Actually use the `skip_merges` option in Repository#commits (Tony Chu)
- Fix API to keep request parameters in Link header (Michael Potthoff)
- Deprecate API "merge_request/:merge_request_id/comments". Use "merge_requests/:merge_request_id/notes" instead
- Deprecate API "merge_request/:merge_request_id/...". Use "merge_requests/:merge_request_id/..." instead
...
...
app/models/repository.rb
View file @
b62cdc3c
...
...
@@ -78,7 +78,8 @@ class Repository
offset:
offset
,
# --follow doesn't play well with --skip. See:
# https://gitlab.com/gitlab-org/gitlab-ce/issues/3574#note_3040520
follow:
false
follow:
false
,
skip_merges:
skip_merges
}
commits
=
Gitlab
::
Git
::
Commit
.
where
(
options
)
...
...
spec/models/repository_spec.rb
View file @
b62cdc3c
...
...
@@ -239,4 +239,10 @@ describe Repository, models: true do
it
{
is_expected
.
to
eq
(
true
)
}
end
end
describe
:skip_merged_commit
do
subject
{
repository
.
commits
(
Gitlab
::
Git
::
BRANCH_REF_PREFIX
+
"'test'"
,
nil
,
100
,
0
,
true
).
map
{
|
k
|
k
.
id
}
}
it
{
is_expected
.
not_to
include
(
'e56497bb5f03a90a51293fc6d516788730953899'
)
}
end
end
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