Skip to content

Commit

Permalink
Merge pull request #59 from cksource/t/58
Browse files Browse the repository at this point in the history
Fix: Not staged, deleted files were not shown as modified during mgit status command. Closes #58.
  • Loading branch information
ma2ciek authored Nov 3, 2017
2 parents 0351bbc + 7082c3d commit 52ee784
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
2 changes: 1 addition & 1 deletion lib/utils/gitstatusparser.js
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ module.exports = function gitStatusParser( response ) {

const branch = branchData.split( '...' )[ 0 ].match( /## (.*)$/ )[ 1 ];
const added = findFiles( [ ADDED_STAGED_SYMBOL ] );
const modified = findFiles( [ MODIFIED_NOT_STAGED_SYMBOL, MODIFIED_STAGED_AND_NOT_STAGED_SYMBOL ] );
const modified = findFiles( [ MODIFIED_NOT_STAGED_SYMBOL, MODIFIED_STAGED_AND_NOT_STAGED_SYMBOL, DELETE_NOT_STAGED_SYMBOL ] );
const deleted = findFiles( [ DELETE_STAGED_SYMBOL, DELETE_NOT_STAGED_SYMBOL ] );
const renamed = findFiles( [ RENAMED_STAGED_SYMBOL ] );
const unmerged = findFiles( UNMERGED_SYMBOLS );
Expand Down
4 changes: 3 additions & 1 deletion tests/utils/gitstatusparser.js
Original file line number Diff line number Diff line change
Expand Up @@ -63,8 +63,10 @@ describe( 'utils', () => {
const status = gitStatusParser( gitStatusResponse );

expect( status.modified ).to.deep.equal( [
'README.txt',
'lib/index.js',
'lib/tasks/logger.js'
'lib/tasks/logger.js',
'lib/tasks/.gitkeep'
] );
} );

Expand Down

0 comments on commit 52ee784

Please sign in to comment.