Fix nonatomic database update potentially causing project star counts to go negative
The `counter_cache` decrement function is called when a project star is deleted,
but there was no guarantee multiple workers would not attempt to delete the
same item simultaneously. Use an atomic update to prevent the count from going negative.
Note: I was only able to duplicate the issue on GitLab.com, but I haven't been able to replicate it anywhere else. Presumably this bug happens when the `WHERE` clause takes some time to search for the right entry and multiple requests get sent simultaneously. Need to verify whether this fix truly solves the issue.
Closes#3067
See merge request !1628
Separate rendering of Markdown reference links from redacting those the user doesn't have access to and extracting referenced objects
Related: !1014
See merge request !1090
The counter_cache decrement function is called when a project star is deleted,
but there was no guarantee multiple workers would not attempt to delete the
same item simultaneously. Use an atomic update to prevent the count from going negative.
Closes#3067
This adds indexes for the following columns:
* notes.line_code
* ci_projects.gitlab_id
* ci_projects.shared_runners_enabled
* ci_builds.type
* ci_builds.status
Track compatible gitlab-git-http-server version
The 'git archive' changes in GitLab 8.1 require a version of
gitlab-git-http-server that is incompatible with GitLab 8.0, so we
need to keep track of this now.
See merge request !1603
Dont put padding on typography but on holder elements instead
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
Fixes wrong padding of wiki content.
cc @JobV @skyruler
See merge request !1620
Add a system note and update relevant merge requests when a branch is deleted or re-added
If a branch is deleted with an open merge request, amended offline, and then pushed again,
GitLab doesn't bother to update the merge request even though the last commit ID and/or
code may have changed. This MR ensures that each push will update any relevant merge
requests and adds a system note if this happens as well.
The new messages look like:

Closes#2926
See merge request !1601
If a branch is deleted with an open merge request, amended offline, and then pushed again,
GitLab doesn't bother to update the merge request even though the last commit ID and/or
code may have changed. This MR ensures that each push will update any relevant merge
requests and adds a system note if this happens as well.
Closes#2926
Also adds a preamble note that a working 8.0 installation (i.e.,
gitlab-git-http-server, updated Nginx/Apache configs) is required before
proceeding.
[ci skip]