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
6af30c73
Commit
6af30c73
authored
Jul 26, 2017
by
Valery Sizov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix Rebasing not working with Merge Requests
parent
248ddf26
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
24 additions
and
1 deletion
+24
-1
app/services/merge_requests/working_copy_base_service.rb
app/services/merge_requests/working_copy_base_service.rb
+5
-1
changelogs/unreleased-ee/fix_rebase_feature.yml
changelogs/unreleased-ee/fix_rebase_feature.yml
+4
-0
spec/services/merge_requests/rebase_service_spec.rb
spec/services/merge_requests/rebase_service_spec.rb
+15
-0
No files found.
app/services/merge_requests/working_copy_base_service.rb
View file @
6af30c73
...
...
@@ -49,7 +49,11 @@ module MergeRequests
end
def
git_env
{
'GL_ID'
=>
Gitlab
::
GlId
.
gl_id
(
current_user
),
'GL_PROTOCOL'
=>
'web'
}
{
'GL_ID'
=>
Gitlab
::
GlId
.
gl_id
(
current_user
),
'GL_PROTOCOL'
=>
'web'
,
'GL_REPOSITORY'
=>
Gitlab
::
GlRepository
.
gl_repository
(
project
,
false
),
}
end
# Don't try to print expensive instance variables.
...
...
changelogs/unreleased-ee/fix_rebase_feature.yml
0 → 100644
View file @
6af30c73
---
title
:
Fix Rebasing not working with Merge Requests
merge_request
:
author
:
spec/services/merge_requests/rebase_service_spec.rb
View file @
6af30c73
...
...
@@ -40,6 +40,21 @@ describe MergeRequests::RebaseService do
expect
(
head_commit
.
committer_email
).
to
eq
(
user
.
email
)
expect
(
head_commit
.
committer_name
).
to
eq
(
user
.
name
)
end
context
'git commands'
do
let
(
:service
)
{
described_class
.
new
(
project
,
user
,
{})
}
it
'sets GL_REPOSITORY env variable when calling git commands'
do
expect_any_instance_of
(
described_class
)
.
to
receive
(
:run_git_command
).
exactly
(
4
).
with
(
anything
,
anything
,
hash_including
(
'GL_REPOSITORY'
),
anything
)
service
.
execute
(
merge_request
)
end
end
end
end
end
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