Commit f65684f8 authored by GitLab Bot's avatar GitLab Bot

Merge remote-tracking branch 'upstream/master' into ce-to-ee-2018-04-04

# Conflicts:
#	app/assets/javascripts/pages/groups/issues/index.js
#	app/views/admin/application_settings/show.html.haml
#	doc/user/project/labels.md

[ci skip]
parents 9bcd3fd4 cb5bb4db
...@@ -6,7 +6,10 @@ import FilteredSearchTokenKeysIssues from 'ee/filtered_search/filtered_search_to ...@@ -6,7 +6,10 @@ import FilteredSearchTokenKeysIssues from 'ee/filtered_search/filtered_search_to
document.addEventListener('DOMContentLoaded', () => { document.addEventListener('DOMContentLoaded', () => {
initFilteredSearch({ initFilteredSearch({
page: FILTERED_SEARCH.ISSUES, page: FILTERED_SEARCH.ISSUES,
<<<<<<< HEAD
filteredSearchTokenKeys: FilteredSearchTokenKeysIssues, filteredSearchTokenKeys: FilteredSearchTokenKeysIssues,
=======
>>>>>>> upstream/master
isGroupDecendent: true, isGroupDecendent: true,
}); });
projectSelect(); projectSelect();
......
...@@ -123,7 +123,7 @@ module TreeHelper ...@@ -123,7 +123,7 @@ module TreeHelper
# returns the relative path of the first subdir that doesn't have only one directory descendant # returns the relative path of the first subdir that doesn't have only one directory descendant
def flatten_tree(root_path, tree) def flatten_tree(root_path, tree)
return tree.flat_path.sub(%r{\A#{root_path}/}, '') if tree.flat_path.present? return tree.flat_path.sub(%r{\A#{Regexp.escape(root_path)}/}, '') if tree.flat_path.present?
subtree = Gitlab::Git::Tree.where(@repository, @commit.id, tree.path) subtree = Gitlab::Git::Tree.where(@repository, @commit.id, tree.path)
if subtree.count == 1 && subtree.first.dir? if subtree.count == 1 && subtree.first.dir?
......
...@@ -302,6 +302,7 @@ ...@@ -302,6 +302,7 @@
= _('Allow requests to the local network from hooks and services.') = _('Allow requests to the local network from hooks and services.')
.settings-content .settings-content
= render 'outbound' = render 'outbound'
<<<<<<< HEAD
-# EE-only -# EE-only
- if Gitlab::Geo.license_allows? - if Gitlab::Geo.license_allows?
...@@ -363,3 +364,5 @@ ...@@ -363,3 +364,5 @@
= _('Geo allows you to replicate your GitLab instance to other geographical locations.') = _('Geo allows you to replicate your GitLab instance to other geographical locations.')
.settings-content .settings-content
= render partial: 'slack' = render partial: 'slack'
=======
>>>>>>> upstream/master
---
title: Fix links to subdirectories of a directory with a plus character in its path
merge_request:
author:
type: fixed
---
title: Bulk deleting refs is handled by Gitaly by default
merge_request:
author:
type: performance
...@@ -78,10 +78,15 @@ Every issue and merge request can be assigned any number of labels. The labels a ...@@ -78,10 +78,15 @@ Every issue and merge request can be assigned any number of labels. The labels a
### Filtering in list pages ### Filtering in list pages
From the project issue list page and the project merge request list page, you can [filter](../search/index.md#issues-and-merge-requests) by both group (including subgroup ancestors) labels and project labels. From the project issue list page and the project merge request list page, you can [filter](../search/index.md#issues-and-merge-requests) by both group (including subgroup ancestors) labels and project labels.
<<<<<<< HEAD
From the group issue list page and the group merge request list page, you can [filter](../search/index.md#issues-and-merge-requests) by both group labels (including subgroup ancestors and subgroup descendants) and project labels. From the group issue list page and the group merge request list page, you can [filter](../search/index.md#issues-and-merge-requests) by both group labels (including subgroup ancestors and subgroup descendants) and project labels.
From the group epic list page, you can [filter](../search/index.md#issues-and-merge-requests) by both current group labels as well as decendent group labels. From the group epic list page, you can [filter](../search/index.md#issues-and-merge-requests) by both current group labels as well as decendent group labels.
=======
From the group issue list page and the group merge request list page, you can [filter](../search/index.md#issues-and-merge-requests) by both group labels (including subgroup ancestors and subgroup descendants) and project labels.
>>>>>>> upstream/master
![Labels group issues](img/labels_group_issues.png) ![Labels group issues](img/labels_group_issues.png)
......
...@@ -885,7 +885,8 @@ module Gitlab ...@@ -885,7 +885,8 @@ module Gitlab
end end
def delete_refs(*ref_names) def delete_refs(*ref_names)
gitaly_migrate(:delete_refs) do |is_enabled| gitaly_migrate(:delete_refs,
status: Gitlab::GitalyClient::MigrationStatus::OPT_OUT) do |is_enabled|
if is_enabled if is_enabled
gitaly_delete_refs(*ref_names) gitaly_delete_refs(*ref_names)
else else
......
...@@ -25,17 +25,14 @@ describe "User sorts issues" do ...@@ -25,17 +25,14 @@ describe "User sorts issues" do
page.within(".issues-list") do page.within(".issues-list") do
page.within("li.issue:nth-child(1)") do page.within("li.issue:nth-child(1)") do
expect(page).to have_content(issue1.title) expect(page).to have_content(issue1.title)
expect(page).to have_content("2 1")
end end
page.within("li.issue:nth-child(2)") do page.within("li.issue:nth-child(2)") do
expect(page).to have_content(issue2.title) expect(page).to have_content(issue2.title)
expect(page).to have_content("1 2")
end end
page.within("li.issue:nth-child(3)") do page.within("li.issue:nth-child(3)") do
expect(page).to have_content(issue3.title) expect(page).to have_content(issue3.title)
expect(page).not_to have_content("0 0")
end end
end end
end end
......
...@@ -8,6 +8,7 @@ describe TreeHelper do ...@@ -8,6 +8,7 @@ describe TreeHelper do
describe '.render_tree' do describe '.render_tree' do
before do before do
@id = sha @id = sha
@path = ""
@project = project @project = project
@lfs_blob_ids = [] @lfs_blob_ids = []
end end
...@@ -61,6 +62,15 @@ describe TreeHelper do ...@@ -61,6 +62,15 @@ describe TreeHelper do
end end
end end
end end
context 'when the root path contains a plus character' do
let(:root_path) { 'gtk/C++' }
let(:tree_item) { double(flat_path: 'gtk/C++/glade') }
it 'returns the flattened path' do
expect(subject).to eq('glade')
end
end
end end
describe '#commit_in_single_accessible_branch' do describe '#commit_in_single_accessible_branch' do
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment