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)
266
266
{
267
267
string configPath = CreateConfigurationWithDummyUser ( Constants . Signature ) ;
268
268
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 ) ;
270
277
}
271
278
272
279
class EmptyFilter : Filter
Original file line number Diff line number Diff line change @@ -15,6 +15,11 @@ public class FilterAttributeEntry
15
15
16
16
private readonly string filterDefinition ;
17
17
18
+ /// <summary>
19
+ /// For testing purposes
20
+ /// </summary>
21
+ protected FilterAttributeEntry ( ) { }
22
+
18
23
/// <summary>
19
24
/// The name of the filter found in a .gitattributes file
20
25
/// </summary>
@@ -34,7 +39,7 @@ public FilterAttributeEntry(string filterName)
34
39
/// <summary>
35
40
/// The filter name in the form of 'filter=filterName'
36
41
/// </summary>
37
- public string FilterDefinition
42
+ public virtual string FilterDefinition
38
43
{
39
44
get { return filterDefinition ; }
40
45
}
You can’t perform that action at this time.
0 commit comments