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
Jérome Perrin
gitlab-ce
Commits
799c8edf
Commit
799c8edf
authored
Jul 28, 2017
by
Jacob Schatz
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixes bug when file content not used in commit.
parent
8a95648b
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
9 additions
and
7 deletions
+9
-7
app/assets/javascripts/repo/repo_commit_section.vue
app/assets/javascripts/repo/repo_commit_section.vue
+6
-4
app/assets/javascripts/repo/repo_helper.js
app/assets/javascripts/repo/repo_helper.js
+0
-1
app/assets/javascripts/repo/repo_store.js
app/assets/javascripts/repo/repo_store.js
+3
-2
No files found.
app/assets/javascripts/repo/repo_commit_section.vue
View file @
799c8edf
...
@@ -14,8 +14,6 @@ const RepoCommitSection = {
...
@@ -14,8 +14,6 @@ const RepoCommitSection = {
branchPaths
()
{
branchPaths
()
{
let
branch
=
Helper
.
getBranch
();
let
branch
=
Helper
.
getBranch
();
return
this
.
changedFiles
.
map
((
f
)
=>
{
return
this
.
changedFiles
.
map
((
f
)
=>
{
console
.
log
(
'
branch
'
,
branch
)
console
.
log
(
Helper
.
getFilePathFromFullPath
(
f
.
url
,
branch
))
return
Helper
.
getFilePathFromFullPath
(
f
.
url
,
branch
);
return
Helper
.
getFilePathFromFullPath
(
f
.
url
,
branch
);
});
});
}
}
...
@@ -26,11 +24,15 @@ const RepoCommitSection = {
...
@@ -26,11 +24,15 @@ const RepoCommitSection = {
// see https://docs.gitlab.com/ce/api/commits.html#create-a-commit-with-multiple-files-and-actions
// see https://docs.gitlab.com/ce/api/commits.html#create-a-commit-with-multiple-files-and-actions
const
branch
=
Helper
.
getBranch
();
const
branch
=
Helper
.
getBranch
();
const
commitMessage
=
this
.
commitMessage
;
const
commitMessage
=
this
.
commitMessage
;
const
actions
=
this
.
branchPaths
.
map
((
f
)
=>
{
this
.
changedFiles
.
map
((
f
)
=>
{
console
.
log
(
'
fffff
'
,
f
.
newContent
)
});
return
;
const
actions
=
this
.
changedFiles
.
map
((
f
)
=>
{
const
filePath
=
Helper
.
getFilePathFromFullPath
(
f
.
url
,
branch
);
const
filePath
=
Helper
.
getFilePathFromFullPath
(
f
.
url
,
branch
);
return
{
return
{
action
:
'
update
'
,
action
:
'
update
'
,
file_path
:
filePath
,
file_path
:
Helper
.
getFilePathFromFullPath
(
f
.
url
,
branch
)
,
content
:
f
.
newContent
,
content
:
f
.
newContent
,
};
};
});
});
...
...
app/assets/javascripts/repo/repo_helper.js
View file @
799c8edf
...
@@ -45,7 +45,6 @@ const RepoHelper = {
...
@@ -45,7 +45,6 @@ const RepoHelper = {
},
},
getFilePathFromFullPath
(
fullPath
,
branch
)
{
getFilePathFromFullPath
(
fullPath
,
branch
)
{
console
.
log
(
fullPath
,
branch
)
return
fullPath
.
split
(
branch
)[
1
];
return
fullPath
.
split
(
branch
)[
1
];
},
},
...
...
app/assets/javascripts/repo/repo_store.js
View file @
799c8edf
...
@@ -196,10 +196,11 @@ const RepoStore = {
...
@@ -196,10 +196,11 @@ const RepoStore = {
setActiveFileContents
(
contents
)
{
setActiveFileContents
(
contents
)
{
if
(
!
RepoStore
.
editMode
)
return
;
if
(
!
RepoStore
.
editMode
)
return
;
const
currentFile
=
RepoStore
.
openedFiles
[
RepoStore
.
activeFileIndex
];
RepoStore
.
activeFile
.
newContent
=
contents
;
RepoStore
.
activeFile
.
newContent
=
contents
;
RepoStore
.
activeFile
.
changed
=
RepoStore
.
activeFile
.
plain
!==
RepoStore
.
activeFile
.
newContent
;
RepoStore
.
activeFile
.
changed
=
RepoStore
.
activeFile
.
plain
!==
RepoStore
.
activeFile
.
newContent
;
RepoStore
.
openedFiles
[
RepoStore
.
activeFileIndex
].
changed
=
RepoStore
.
activeFile
.
changed
;
currentFile
.
changed
=
RepoStore
.
activeFile
.
changed
;
currentFile
.
newContent
=
contents
;
},
},
// getters
// getters
...
...
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