Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
1
Merge Requests
1
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
gitlab-ce
Commits
b3ff6250
Commit
b3ff6250
authored
Jul 04, 2017
by
Valery Sizov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Resolve conflicts in CE->EE MR
parent
f5abc9f6
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
1 addition
and
37 deletions
+1
-37
GITLAB_SHELL_VERSION
GITLAB_SHELL_VERSION
+0
-4
db/schema.rb
db/schema.rb
+0
-4
lib/gitlab/shell.rb
lib/gitlab/shell.rb
+0
-20
spec/lib/gitlab/shell_spec.rb
spec/lib/gitlab/shell_spec.rb
+1
-9
No files found.
GITLAB_SHELL_VERSION
View file @
b3ff6250
<<<<<<< HEAD
5.1.0
=======
5.1.1
>>>>>>> b5b4054d5882782892d0a860c7e95db9a22bfdec
db/schema.rb
View file @
b3ff6250
...
...
@@ -11,11 +11,7 @@
#
# It's strongly recommended that you check this file into your version control system.
<<<<<<<
HEAD
ActiveRecord
::
Schema
.
define
(
version:
20170627211700
)
do
=======
ActiveRecord
::
Schema
.
define
(
version:
20170623080805
)
do
>>>>>>>
b5b4054d5882782892d0a860c7e95db9a22bfdec
# These are extensions that must be enabled in order to support this database
enable_extension
"plpgsql"
...
...
lib/gitlab/shell.rb
View file @
b3ff6250
...
...
@@ -196,15 +196,10 @@ module Gitlab
# add_key("key-42", "sha-rsa ...")
#
def
add_key
(
key_id
,
key_content
)
<<<<<<<
HEAD
return
unless
self
.
authorized_keys_enabled?
Gitlab
::
Utils
.
system_silent
([
gitlab_shell_keys_path
,
'add-key'
,
key_id
,
self
.
class
.
strip_key
(
key_content
)])
=======
gitlab_shell_fast_execute
([
gitlab_shell_keys_path
,
'add-key'
,
key_id
,
self
.
class
.
strip_key
(
key_content
)])
>>>>>>>
b5b4054d5882782892d0a860c7e95db9a22bfdec
end
# Batch-add keys to authorized_keys
...
...
@@ -224,20 +219,12 @@ module Gitlab
# Ex.
# remove_key("key-342", "sha-rsa ...")
#
<<<<<<<
HEAD
def
remove_key
(
key_id
,
key_content
=
nil
)
return
unless
self
.
authorized_keys_enabled?
args
=
[
gitlab_shell_keys_path
,
'rm-key'
,
key_id
]
args
<<
key_content
if
key_content
Gitlab
::
Utils
.
system_silent
(
args
)
=======
def
remove_key
(
key_id
,
key_content
)
args
=
[
gitlab_shell_keys_path
,
'rm-key'
,
key_id
]
args
<<
key_content
if
key_content
gitlab_shell_fast_execute
(
args
)
>>>>>>>
b5b4054d5882782892d0a860c7e95db9a22bfdec
end
# Remove all ssh keys from gitlab shell
...
...
@@ -246,13 +233,9 @@ module Gitlab
# remove_all_keys
#
def
remove_all_keys
<<<<<<<
HEAD
return
unless
self
.
authorized_keys_enabled?
Gitlab
::
Utils
.
system_silent
([
gitlab_shell_keys_path
,
'clear'
])
=======
gitlab_shell_fast_execute
([
gitlab_shell_keys_path
,
'clear'
])
>>>>>>>
b5b4054d5882782892d0a860c7e95db9a22bfdec
end
# Remove ssh keys from gitlab shell that are not in the DB
...
...
@@ -433,14 +416,12 @@ module Gitlab
File
.
join
(
gitlab_shell_path
,
'bin'
,
'gitlab-keys'
)
end
<<<<<<<
HEAD
def
authorized_keys_enabled?
# Return true if nil to ensure the authorized_keys methods work while
# fixing the authorized_keys file during migration.
return
true
if
current_application_settings
.
authorized_keys_enabled
.
nil?
current_application_settings
.
authorized_keys_enabled
=======
private
def
gitlab_shell_fast_execute
(
cmd
)
...
...
@@ -465,7 +446,6 @@ module Gitlab
# Don't pass along the entire parent environment to prevent gitlab-shell
# from wasting I/O by searching through GEM_PATH
Bundler
.
with_original_env
{
Popen
.
popen
(
cmd
,
nil
,
vars
)
}
>>>>>>>
b5b4054d5882782892d0a860c7e95db9a22bfdec
end
end
end
spec/lib/gitlab/shell_spec.rb
View file @
b3ff6250
...
...
@@ -105,11 +105,10 @@ describe Gitlab::Shell, lib: true do
end
describe
'#add_key'
do
<<<<<<<
HEAD
context
'when authorized_keys_enabled is true'
do
it
'removes trailing garbage'
do
allow
(
gitlab_shell
).
to
receive
(
:gitlab_shell_keys_path
).
and_return
(
:gitlab_shell_keys_path
)
expect
(
Gitlab
::
Utils
).
to
receive
(
:system_silent
).
with
(
expect
(
gitlab_shell
).
to
receive
(
:gitlab_shell_fast_execute
).
with
(
[
:gitlab_shell_keys_path
,
'add-key'
,
'key-123'
,
'ssh-rsa foobar'
]
)
...
...
@@ -169,13 +168,6 @@ describe Gitlab::Shell, lib: true do
end
end
end
=======
it
'removes trailing garbage'
do
allow
(
gitlab_shell
).
to
receive
(
:gitlab_shell_keys_path
).
and_return
(
:gitlab_shell_keys_path
)
expect
(
gitlab_shell
).
to
receive
(
:gitlab_shell_fast_execute
).
with
(
[
:gitlab_shell_keys_path
,
'add-key'
,
'key-123'
,
'ssh-rsa foobar'
]
)
>>>>>>>
b5b4054d5882782892d0a860c7e95db9a22bfdec
context
'when authorized_keys_enabled is nil'
do
before
do
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment