File tree 2 files changed +14
-3
lines changed
2 files changed +14
-3
lines changed Original file line number Diff line number Diff line change @@ -6,7 +6,7 @@ export { isClean };
6
6
* Asynchrounously determines if the staging area is clean
7
7
*/
8
8
function 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' , {
10
10
maxBuffer : Infinity ,
11
11
cwd : repoPath || process . cwd ( )
12
12
} , function ( error , stdout ) {
Original file line number Diff line number Diff line change @@ -63,9 +63,20 @@ describe('staging', function () {
63
63
staging . isClean ( repoConfig . path , function ( afterWriteStagingIsCleanError , afterWriteStagingIsClean ) {
64
64
expect ( afterWriteStagingIsCleanError ) . to . be . null ;
65
65
expect ( afterWriteStagingIsClean ) . to . be . false ;
66
- done ( ) ;
67
- } ) ;
68
66
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
+ } ) ;
69
80
} ) ;
70
81
} ) ;
71
82
} ) ;
You can’t perform that action at this time.
0 commit comments