Refactor can_be_merged logic for merge request
Some refactoring after !918
cc @DouweM @rspeicher
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
See merge request !919
Merge branches inside one repository using rugged instead of satellites
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
cc @rspeicher @DouweM
See merge request !918
Extract the longest-matching ref from a commit path when multiple matches occur
### What does this MR do?
This MR extracts the longest-matching ref from a commit path. In cases when there are multiple refs that prefix the path, the ref name is ambiguous. Using the heuristic that the longest-matching ref seems like a sensible default.
### Why was this MR needed?
Suppose there is a branch named `release/app` and a tag named `release/app/v1.0.0`. Suppose `README.md` exists in the root directory.
Let's suppose the path passed in is `release/app/v1.0.0/README.md`. There are two possible ways to interpret the ref and path:
1. ref = `release/app`, path = `v1.0.0/README.md`
2. ref = `release/app/v1.0.0`, path = `README.md`
The crux of the issue is that there is ambiguity which one is correct; both could be real possibilities. In the current implementation of `extract_ref`, GitLab gets confused and tries neither: it uses ref = `release` and path = `app/v1.0.0/README.md`. Since the file does not exist, it returns 404.
### What are the relevant issue numbers?
Closes#1839
See merge request !859
UX improvements
* make atom feed on commits page smaller so it capture less attention
* open big image 400px instead of default 40px when click on user avatar
See merge request !910
Performance improvements after caching html fragments
* re-use event cache with other users
* cache commit fragment
* cache issue fragment in list
* cache comment parsed with markdown
See merge request !911
Fix ApplicationHelper specs
On current `master` if you run these specs by themselves, they fail. I have no idea why they work when run with other specs, but now they work all the time.
- Use the `helper` object, as per RSpec 3 standards
- Use `assign` to assign instance variables that helpers expect
- Add `StubConfiguration` support module
See merge request !906
- sprockets (rails dependency, but we need to specify a version to pull
in fixes)
- sass-rails (no security issues, but required an update to meet new
sprockets version requirement)
- rest-client (coveralls dependency)
There were several specs that were failing when run by themselves.
- Use the `helper` object, as per RSpec 3 standards
- Use `assign` to assign instance variables that helpers expect
- Add `StubConfiguration` support module