@@ -26,19 +26,19 @@ private static string GetGitSystemHash(GitPreparer gitPreparer, IFileSystem file
26
26
var dotGitDirectory = gitPreparer . GetDotGitDirectory ( ) ;
27
27
28
28
// traverse the directory and get a list of files, use that for GetHash
29
- var traverse = TraverseTree ( Path . Combine ( dotGitDirectory , "refs" ) ) ;
29
+ var contents = calculateDirectoryContents ( Path . Combine ( dotGitDirectory , "refs" ) ) ;
30
30
31
- return GetHash ( traverse . ToArray ( ) ) ;
31
+ return GetHash ( contents . ToArray ( ) ) ;
32
32
}
33
33
34
- // lifted from https://msdn.microsoft.com/en-us/library/bb513869.aspx
35
- public static List < string > TraverseTree ( string root )
34
+ // based on https://msdn.microsoft.com/en-us/library/bb513869.aspx
35
+ private static List < string > calculateDirectoryContents ( string root )
36
36
{
37
- var result = new List < string > { root } ;
37
+ var result = new List < string > ( ) ;
38
38
39
39
// Data structure to hold names of subfolders to be
40
40
// examined for files.
41
- var dirs = new Stack < string > ( 20 ) ;
41
+ var dirs = new Stack < string > ( ) ;
42
42
43
43
if ( ! Directory . Exists ( root ) )
44
44
{
@@ -104,7 +104,6 @@ public static List<string> TraverseTree(string root)
104
104
var fi = new FileInfo ( file ) ;
105
105
result . Add ( fi . Name ) ;
106
106
result . Add ( File . ReadAllText ( file ) ) ;
107
- //Logger.WriteInfo(string.Format("{0}: {1}, {2}", fi.Name, fi.Length, fi.CreationTime));
108
107
}
109
108
catch ( IOException e )
110
109
{
0 commit comments