Merge branch 'cwq1913/gitlab-ce-fix_skip_merge_commits' into 'master'
Actually use the `skip_merges` option in Repository#commits Originally opened at !2067 by @cwq1913. See merge request !2750
This commit is contained in:
commit
51998fddca
3 changed files with 9 additions and 1 deletions
|
@ -31,6 +31,7 @@ v 8.5.0 (unreleased)
|
|||
- Optimized performance of finding issues to be closed by a merge request
|
||||
- API: Expose MergeRequest#merge_status (Andrei Dziahel)
|
||||
- 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
|
||||
|
|
|
@ -84,7 +84,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)
|
||||
|
|
|
@ -354,4 +354,10 @@ describe Repository, models: true do
|
|||
repository.expire_branch_cache('foo')
|
||||
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
|
||||
|
|
Loading…
Reference in a new issue