File tree 2 files changed +18
-0
lines changed
2 files changed +18
-0
lines changed Original file line number Diff line number Diff line change @@ -31,6 +31,12 @@ function execCommit (args, newVersion) {
31
31
toAdd += ' ' + path . relative ( process . cwd ( ) , p )
32
32
}
33
33
} )
34
+
35
+ if ( args . commitAll ) {
36
+ msg += ' and %s'
37
+ paths . push ( 'all staged files' )
38
+ }
39
+
34
40
checkpoint ( args , msg , paths )
35
41
return runExec ( args , 'git add' + toAdd + ' ' + args . infile )
36
42
. then ( ( ) => {
Original file line number Diff line number Diff line change @@ -667,6 +667,18 @@ describe('cli', function () {
667
667
result . stdout . should . not . match ( / n p m p u b l i s h / )
668
668
} )
669
669
670
+ it ( 'does not display `all staged files` without the --commit-all flag' , function ( ) {
671
+ var result = execCli ( )
672
+ result . code . should . equal ( 0 )
673
+ result . stdout . should . not . match ( / a n d a l l s t a g e d f i l e s / )
674
+ } )
675
+
676
+ it ( 'does display `all staged files` if the --commit-all flag is passed' , function ( ) {
677
+ var result = execCli ( '--commit-all' )
678
+ result . code . should . equal ( 0 )
679
+ result . stdout . should . match ( / a n d a l l s t a g e d f i l e s / )
680
+ } )
681
+
670
682
it ( 'includes merge commits' , function ( ) {
671
683
var branchName = 'new-feature'
672
684
commit ( 'feat: first commit' )
You can’t perform that action at this time.
0 commit comments