@@ -2633,17 +2633,16 @@ webui.NewChangedFilesView = function(workspaceView) {
26332633 }
26342634
26352635 self . amend = function ( message , details ) {
2636- var selectedFilesAsString = selectedItems . join ( " " ) ;
26372636
26382637 if ( self . commitMsgEmpty ( ) ) {
2639- webui . git_command ( [ ' add' , selectedFilesAsString ] ) ;
2640- webui . git_command ( [ 'commit' , '--amend' , '--no-edit' , '--' , selectedFilesAsString ] , function ( output ) {
2638+ webui . git_command ( [ " add" ] . concat ( selectedItems ) ) ;
2639+ webui . git_command ( [ 'commit' , '--amend' , '--no-edit' , '--' ] . concat ( selectedItems ) , function ( output ) {
26412640 webui . showSuccess ( output ) ;
26422641 workspaceView . update ( ) ;
26432642 } ) ;
26442643 } else if ( selectedItems . length != 0 ) {
2645- webui . git_command ( [ ' add' , selectedFilesAsString ] ) ;
2646- webui . git_command ( [ 'commit' , '--amend' , '-m' , message , '-m' , 'details' , '--' , selectedFilesAsString ] , function ( output ) {
2644+ webui . git_command ( [ " add" ] . concat ( selectedItems ) ) ;
2645+ webui . git_command ( [ 'commit' , '--amend' , '-m' , message , '-m' , 'details' , '--' ] . concat ( selectedItems ) , function ( output ) {
26472646 webui . showSuccess ( output ) ;
26482647 workspaceView . update ( ) ;
26492648 } ) ;
@@ -2658,9 +2657,8 @@ webui.NewChangedFilesView = function(workspaceView) {
26582657 }
26592658
26602659 self . commit = function ( message , details ) {
2661- var selectedFilesAsString = selectedItems . join ( " " ) ;
2662- webui . git_command ( [ 'add' , selectedFilesAsString ] ) ;
2663- webui . git_command ( [ 'commit' , '-m' , message , '-m' , details , '--' , selectedFilesAsString ] , function ( output ) {
2660+ webui . git_command ( [ "add" ] . concat ( selectedItems ) ) ;
2661+ webui . git_command ( [ 'commit' , '-m' , message , '-m' , details , '--' ] . concat ( selectedItems ) , function ( output ) {
26642662 webui . showSuccess ( output ) ;
26652663 workspaceView . update ( ) ;
26662664 } ) ;
0 commit comments