File tree Expand file tree Collapse file tree 2 files changed +14
-3
lines changed Expand file tree Collapse file tree 2 files changed +14
-3
lines changed Original file line number Diff line number Diff line change @@ -6,7 +6,7 @@ export { isClean };
66 * Asynchrounously determines if the staging area is clean
77 */
88function isClean ( repoPath , done ) {
9- exec ( 'git diff --cached --name-only' , {
9+ exec ( 'git diff --no-ext-diff --name-only && git diff --no-ext-diff -- cached --name-only' , {
1010 maxBuffer : Infinity ,
1111 cwd : repoPath || process . cwd ( )
1212 } , function ( error , stdout ) {
Original file line number Diff line number Diff line change @@ -63,9 +63,20 @@ describe('staging', function () {
6363 staging . isClean ( repoConfig . path , function ( afterWriteStagingIsCleanError , afterWriteStagingIsClean ) {
6464 expect ( afterWriteStagingIsCleanError ) . to . be . null ;
6565 expect ( afterWriteStagingIsClean ) . to . be . false ;
66- done ( ) ;
67- } ) ;
6866
67+ writeFilesToPath ( {
68+ dummymodified : {
69+ contents : repoConfig . files . dummyfile . contents + '-modified' ,
70+ filename : repoConfig . files . dummyfile . filename ,
71+ }
72+ } , repoConfig . path ) ;
73+
74+ staging . isClean ( repoConfig . path , function ( afterWriteStagingIsCleanError , afterWriteStagingIsClean ) {
75+ expect ( afterWriteStagingIsCleanError ) . to . be . null ;
76+ expect ( afterWriteStagingIsClean ) . to . be . false ;
77+ done ( ) ;
78+ } ) ;
79+ } ) ;
6980 } ) ;
7081 } ) ;
7182 } ) ;
You can’t perform that action at this time.
0 commit comments