@@ -2633,17 +2633,16 @@ webui.NewChangedFilesView = function(workspaceView) {
2633
2633
}
2634
2634
2635
2635
self . amend = function ( message , details ) {
2636
- var selectedFilesAsString = selectedItems . join ( " " ) ;
2637
2636
2638
2637
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 ) {
2641
2640
webui . showSuccess ( output ) ;
2642
2641
workspaceView . update ( ) ;
2643
2642
} ) ;
2644
2643
} 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 ) {
2647
2646
webui . showSuccess ( output ) ;
2648
2647
workspaceView . update ( ) ;
2649
2648
} ) ;
@@ -2658,9 +2657,8 @@ webui.NewChangedFilesView = function(workspaceView) {
2658
2657
}
2659
2658
2660
2659
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 ) {
2664
2662
webui . showSuccess ( output ) ;
2665
2663
workspaceView . update ( ) ;
2666
2664
} ) ;
0 commit comments