Commit Graph

9 Commits

Author SHA1 Message Date
GitLab Bot 8588e8b931 Add latest changes from gitlab-org/gitlab@master 2022-10-27 09:10:57 +00:00
GitLab Bot c59765a50a Add latest changes from gitlab-org/gitlab@master 2020-06-24 18:09:03 +00:00
Thong Kuah 4ec16912b8 Autocorrect with RSpec/ExampleWording cop
- rewords examples starting with 'should'
- rewords examples starting with 'it'

Note: I had to manually fixup "onlies" to "only"
2019-04-05 08:43:27 +00:00
Thong Kuah a2cfc150ce Add # frozen_string_literal to spec/models
Adds `# frozen_string_literal: true` to spec/models ruby files
2019-04-01 14:37:54 +13:00
Rémy Coutable ddccd24c13 Remove superfluous lib: true, type: redis, service: true, models: true, services: true, no_db: true, api: true
Signed-off-by: Rémy Coutable <remy@rymai.me>
2017-07-27 14:31:53 +02:00
Timothy Andrew b44eaf8e07 Sort the network graph both by commit date and topographically.
- Previously, we sorted commits by date, which seemed to work okay.

- The one edge case where this failed was when multiple commits have the same
  commit date (for example: when a range of commits are cherry picked with a
  single command, they all have the same commit date [and different author
  dates]).

- Commits with the same commit date would be sorted arbitrarily, and usually
  break the network graph.

- This commit solves the problem by both sorting by date, and by sorting
  topographically (parents aren't displayed until all their children are
  displayed)

- Include review comments from @adamniedzielski

A more detailed explanation is present here:
https://gitlab.com/gitlab-org/gitlab-ce/issues/30973#note_28706230
2017-05-04 04:21:12 +00:00
Timothy Andrew a7e67604b3 Fix ordering of commits in the network graph.
- We upgraded `rugged` to 0.25.1.1 in !10286 for %9.1

- Prior to this upgrade, the default sort order for commits returned by
  `Gitlab::Git::Repository#find_commits` was `Rugged::SORT_DATE`, which the
  graph relied on.

- While upgrading `rugged`, the MR also changed this default to
  `Rugged::SORT_NONE`, which broke commit ordering in the graph.

- This commit adds an option to `Gitlab::Git::Repository#find_commits` to sort
  by date, and changes the graph builder `Network::Graph` so it explictly
  requests the `:date` sort order
2017-04-27 13:09:54 +00:00
Robert Speicher fcb37542e7 Use `:empty_project` where possible in model specs 2017-01-26 17:44:59 -05:00
Stan Hu 5cb488e8a1 Fix Error 500 resulting when loading network graph
`discussion_id` may not be present when the SELECT call for notes
does not include this attribute. Don't attempt to set the discussion ID
unless the model contains the attribute.

Closes #21119, #21128
2016-08-20 09:57:20 -07:00