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
0
Merge Requests
0
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
Boxiang Sun
gitlab-ce
Commits
ae5b935b
Commit
ae5b935b
authored
Dec 08, 2016
by
Lin Jen-Shin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
find the commit properly and replicate gitlab_git
by checking filename as well
parent
cdb598f3
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
1 deletion
+5
-1
app/models/repository.rb
app/models/repository.rb
+5
-1
No files found.
app/models/repository.rb
View file @
ae5b935b
...
@@ -860,7 +860,8 @@ class Repository
...
@@ -860,7 +860,8 @@ class Repository
source_branch:
source_branch
,
source_branch:
source_branch
,
source_project:
source_project
)
do
source_project:
source_project
)
do
index
=
rugged
.
index
index
=
rugged
.
index
branch_commit
=
find_branch
(
branch
)
branch_commit
=
source_project
.
repository
.
find_branch
(
source_branch
||
branch
)
parents
=
if
branch_commit
parents
=
if
branch_commit
last_commit
=
branch_commit
.
dereferenced_target
last_commit
=
branch_commit
.
dereferenced_target
...
@@ -873,6 +874,9 @@ class Repository
...
@@ -873,6 +874,9 @@ class Repository
actions
.
each
do
|
action
|
actions
.
each
do
|
action
|
path
=
Gitlab
::
Git
::
PathHelper
.
normalize_path
(
action
[
:file_path
]).
to_s
path
=
Gitlab
::
Git
::
PathHelper
.
normalize_path
(
action
[
:file_path
]).
to_s
raise
Gitlab
::
Git
::
Repository
::
InvalidBlobName
.
new
(
"Invalid path"
)
if
path
.
split
(
'/'
).
include?
(
'..'
)
case
action
[
:action
]
case
action
[
:action
]
when
:create
,
:update
,
:move
when
:create
,
:update
,
:move
mode
=
mode
=
...
...
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