Fix cloning Wiki repositories via HTTP
Cloning a project Wiki over HTTP would end up cloning the main repository
since the .wiki extension was being stripped.
Closes#3106
See merge request !1676
Fix bug where a push would only create cross references from the first commit.
Apparently we can't `return` from a `Hash.new` block. Who knew.
See merge request !1638
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
Improve User.by_login performance
This greatly speeds up the performance of `User.by_login`. I adopted some changes from @haynes in this patch, the credits go to him for coming up with those originally.
Fixes#2341
See merge request !1545
Let gitlab-git-http-server handle archive downloads
This change relies on changes in gitlab_git and gitlab-git-http-server.
fixes#2429
See merge request !1548
Performance is improved in two steps:
1. On PostgreSQL an expression index is used for checking lower(email)
and lower(username).
2. The check to determine if we're searching for a username or Email is
moved to Ruby. Thanks to @haynes for suggesting and writing the
initial implementation of this.
Moving the check to Ruby makes this method an additional 1.5 times
faster compared to doing the check in the SQL query.
With performance being improved I've now also tweaked the amount of
iterations required by the User.by_login benchmark. This method now runs
between 900 and 1000 iterations per second.
LDAP email address downcasing
Fixes#2960
In the event we cannot match an LDAP user by DN we attempt to find an identity by email address and then update the DN. In this case the identity is matched by email address.
If the user's email address in LDAP has an upper case character we cannot find a match in the GitLab database. GitLab downcases emails before the user object is saved.
This merge request downcases the email from LDAP before we lookup by email. I also added a test to prevent a regression.
See merge request !1550
Normalize space-like characters in keys before output to gitlab-shell
gitlab-shell expects only one tab separator per key, and an SSH key with
a tab character in the comment, for example, would break things.
Closes#2970
See merge request !1552
Refactor Ci::Commit and Ci::Build to have all builds for same :sha on single page
This makes Ci::Commit to have only :sha and simplifies routing to have only :sha in path. The :ref and :push_data is now parameter of Ci::Build.
All commit related data (git author, message and .gitlab-ci.yml) is read directly from repository.
All code related for creating builds is moved to CreateBuildsService.
Status deduction is rewritten to make if more efficient and easier to integrate with Commit Status API.
This is partially working, tests are not yet touched.
This slightly changes view of Commit:

@dzaporozhets What do you think?
See merge request !1502