File tree Expand file tree Collapse file tree 1 file changed +22
-0
lines changed Expand file tree Collapse file tree 1 file changed +22
-0
lines changed Original file line number Diff line number Diff line change @@ -318,6 +318,28 @@ public void RetrievingTheStatusOfAnEmptyRepositoryHonorsTheGitIgnoreDirectives()
318
318
}
319
319
}
320
320
321
+ [ Fact ]
322
+ public void RetrievingTheStatusWithoutIncludeIgnoredIgnoresButDoesntInclude ( )
323
+ {
324
+ string repoPath = InitNewRepository ( ) ;
325
+
326
+ using ( var repo = new Repository ( repoPath ) )
327
+ {
328
+ const string relativePath = "look-ma.txt" ;
329
+ Touch ( repo . Info . WorkingDirectory , relativePath , "I'm going to be ignored!" ) ;
330
+ var opt = new StatusOptions { IncludeIgnored = false } ;
331
+ RepositoryStatus status = repo . RetrieveStatus ( opt ) ;
332
+ Assert . Equal ( new [ ] { relativePath } , status . Untracked . Select ( s => s . FilePath ) ) ;
333
+
334
+ Touch ( repo . Info . WorkingDirectory , ".gitignore" , "*.txt" + Environment . NewLine ) ;
335
+
336
+ RepositoryStatus newStatus = repo . RetrieveStatus ( ) ;
337
+ Assert . Equal ( ".gitignore" , newStatus . Untracked . Select ( s => s . FilePath ) . Single ( ) ) ;
338
+
339
+ Assert . False ( newStatus . Ignored . Any ( ) ) ;
340
+ }
341
+ }
342
+
321
343
[ Fact ]
322
344
public void RetrievingTheStatusOfTheRepositoryHonorsTheGitIgnoreDirectives ( )
323
345
{
You can’t perform that action at this time.
0 commit comments