File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -1397,12 +1397,16 @@ export class CommandCenter {
13971397 opts . signoff = true ;
13981398 }
13991399
1400+ const smartCommitChanges = config . get < 'all' | 'tracked' > ( 'smartCommitChanges' ) ;
1401+
14001402 if (
14011403 (
14021404 // no changes
14031405 ( noStagedChanges && noUnstagedChanges )
14041406 // or no staged changes and not `all`
14051407 || ( ! opts . all && noStagedChanges )
1408+ // no staged changes and no tracked unstaged changes
1409+ || ( noStagedChanges && smartCommitChanges === 'tracked' && repository . workingTreeGroup . resourceStates . every ( r => r . type === Status . UNTRACKED ) )
14061410 )
14071411 && ! opts . empty
14081412 ) {
@@ -1416,7 +1420,7 @@ export class CommandCenter {
14161420 return false ;
14171421 }
14181422
1419- if ( opts . all && config . get < 'all' | 'tracked' > ( ' smartCommitChanges' ) === 'tracked' ) {
1423+ if ( opts . all && smartCommitChanges === 'tracked' ) {
14201424 opts . all = 'tracked' ;
14211425 }
14221426
You can’t perform that action at this time.
0 commit comments