Resolve "Wrong sorting of commit order in MR view?"
!4052 fixed this for the most obvious cases, but there were still some problems.
Here's my test case: I have a branch where I was suffering from an unfortunate
issue. Every other commit I made had its commit date set to one day before it
should have been. (Perhaps my system clock was misbehaving.)
```shell
for i in {1..10}
do
echo $i > $i
git add $i
GIT_COMMITTER_DATE=`date -v -$((i % 2))d` git commit -m $i
done
```
The git CLI still gives me the commits in the right order, but I can see that
the timestamps alternate between two values:
```shell
$ git log --format='%h %ct %p %s' master...HEAD
f0c3108 1463646313 3d38a13 10
3d38a13 1463559913 67f419b 9
67f419b 1463646313 74330c0 8
74330c0 1463559913 56361d7 7
56361d7 1463646313 ba1b60c 6
ba1b60c 1463559913 f91497d 5
f91497d 1463646313 79c5e57 4
79c5e57 1463559913 b953cef 3
b953cef 1463646313 12fc411 2
12fc411 1463559913 835715b 1
```
Unfortunately, GitLab didn't like this _at all_. Here's what the commits on my
MR from that branch looked like:

That's because we were sorting the commits by date, which is safe if they are in
that order anyway. If they aren't, then because Ruby's sorting isn't stable, we
lose even the ordering among the correctly-ordered commits with the same
timestamp.
After these changes (and reloading the MR's diff), this looks like:

The commits view was also wrong, but in a slightly different way. In table form:
| View | Before | After |
| --- | --- | --- |
| Commit list | 10, 8, 6, 4, 2, 9, 7, 5, 3, 1 | 10, 9, 8, 7, 6, 5, 4, 3, 2, 1 |
| MR commits | 10, 2, 8, 4, 6, 5, 7, 3, 9, 1 | 10, 9, 8, 7, 6, 5, 4, 3, 2, 1 |
Closes#12724
See merge request !4208
Fixed project settings alert colors
In another MR, the class name was changed making all the alert messages have no background color

See merge request !4161
It's possible to construct a commit graph where the output of `git log`
isn't in timestamp order. Grouping the commits in the list by date then
gives dramatically wrong results. Instead, go for the more pragmatic
approach: use the commits in the order they're given, and just show the
date line each time the date changes. This means that the same date
header can show up multiple times, but at least the ordering is
preserved.
fix#15127 ActiveJob::DeserializationError thrown
`send_devise_notification` pre-maturely enqueued the task when the user instance
has not yet been committed into the database, causing a record-not-found in the
other sidekiq process.
`devise-async` has already been taking care of asynchronous mail sending, we just
need to run it inside queue `mailers` instead of `mailer` to enable it.
The implementation of `devise-async` enqueues the task in `after_commit` hook
which is the right way to do it.
See merge request !3647
Remove User#tm_in_authorized_projects and User#tm_of
These methods seems to be unused.
Closes#17628.
Signed-off-by: Rémy Coutable <remy@rymai.me>
See merge request !4198
Add container registry support
Tasks:
- [x] Merge docker/distribution authentication service: https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/3787
- [x] Implement Docker Registry API
- [x] Show a list of docker images in GitLab
- [x] Remove registry repository on project deletion
- [x] Support project rename, move and namespace rename
- [x] Use token when connecting the registry
- [x] Allow to delete images from GitLab
- [x] Support pushing from GitLab CI (gitlab-ci-token / $CI_BUILD_TOKEN)
- [x] Support GitLab Runner pulling for public repositories
- [ ] Support GitLab Runner pulling for private repositories
- [x] Add tests for Docker Registry API
- [x] Add tests for a views
- [x] Make texts nicer
- [x] Implement a backup support
- [ ] Create administration documentation https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/4141
- [ ] Create user documentation
See merge request !4040
Fix atom feeds and links
1. The atom feed for a group's issues didn't work, because it had parts copied from the dashboard issues builder template.
2. The feed link from a group's activity page went to the dashboard feed, rather than the group's feed.
Closes#15640
See merge request !4191
Improve issue formatting in Slack service
This will improve the looks of the message that gets send to Slack.
**Before**

**After**

There is one thing I'm not certain about, thats sending the logo with the payload. Because this means we need to host the GitLab logo somewhere public, and every time a payload from any GitLab instance is send, we use that logo url. This might overload the server, or drive the bandwidth bill through the roof.
This is something @sytses or @dzaporozhets have to decide about.
@stanhu, you told me you were the author of the original code, maybe you can review?
See merge request !1308
`Gitlab::Git::Compare` will already have the correct order; sorting in
Ruby can only ruin that. (The correct order being the same as `git log`
- reverse chronological while maintaining the commit graph.)
As an example, imagine a branch where someone has their system clock set
wrong for some of the commits. Not only will those commits be in the
wrong order - which is maybe reasonable - but sorting in Ruby can also
put commits with the same timestamp out of order, as Ruby's sorting
isn't stable.
Remove bottom margin for flash message on home page
### Flash Messages
Remove `margin-bottom: 16px` from `.no-ssh-key-message` and `.project-limit-message`.
This added an unnecessary margin between the notification and the content which was brought up in this issue #14797.
### Affected files:
./app/assets/javascripts/project.js.coffee: $(@).parents('.no-ssh-key-message').remove()
./app/assets/stylesheets/pages/projects.scss:.no-ssh-key-message, .project-limit-message {
./app/views/shared/_no_ssh.html.haml: .no-ssh-key-message.alert.alert-warning.hidden-xs
./app/assets/javascripts/user.js.coffee: $('.hide-project-limit-message').on 'click', (e) ->
./app/assets/javascripts/user.js.coffee: $(@).parents('.project-limit-message').remove()
./app/assets/stylesheets/pages/projects.scss:.no-ssh-key-message, .project-limit-message {
./app/views/shared/_project_limit.html.haml: .project-limit-message.alert.alert-warning.hidden-xs
./app/views/shared/_project_limit.html.haml: = link_to 'Remind later', '#', class: 'hide-project-limit-message alert-link'
### Screenshots:
#### Before:

#### After:

See merge request !4173