File tree Expand file tree Collapse file tree 2 files changed +14
-2
lines changed
Expand file tree Collapse file tree 2 files changed +14
-2
lines changed Original file line number Diff line number Diff line change @@ -266,7 +266,14 @@ private Repository CreateTestRepository(string path)
266266 {
267267 string configPath = CreateConfigurationWithDummyUser ( Constants . Signature ) ;
268268 var repositoryOptions = new RepositoryOptions { GlobalConfigurationLocation = configPath } ;
269- return new Repository ( path , repositoryOptions ) ;
269+ var repository = new Repository ( path , repositoryOptions ) ;
270+ CreateAttributesFile ( repository , "* filter=test" ) ;
271+ return repository ;
272+ }
273+
274+ private static void CreateAttributesFile ( IRepository repo , string attributeEntry )
275+ {
276+ Touch ( repo . Info . WorkingDirectory , ".gitattributes" , attributeEntry ) ;
270277 }
271278
272279 class EmptyFilter : Filter
Original file line number Diff line number Diff line change @@ -15,6 +15,11 @@ public class FilterAttributeEntry
1515
1616 private readonly string filterDefinition ;
1717
18+ /// <summary>
19+ /// For testing purposes
20+ /// </summary>
21+ protected FilterAttributeEntry ( ) { }
22+
1823 /// <summary>
1924 /// The name of the filter found in a .gitattributes file
2025 /// </summary>
@@ -34,7 +39,7 @@ public FilterAttributeEntry(string filterName)
3439 /// <summary>
3540 /// The filter name in the form of 'filter=filterName'
3641 /// </summary>
37- public string FilterDefinition
42+ public virtual string FilterDefinition
3843 {
3944 get { return filterDefinition ; }
4045 }
You can’t perform that action at this time.
0 commit comments