コード例 #1
0
        private GitIndex LoadIndex(uint version)
        {
            PhysicalFileSystem fileSystem       = new PhysicalFileSystem();
            string             workingDirectory = Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location);
            string             path             = Path.Combine(workingDirectory, @"Data\index_v" + version);

            path.ShouldBeAPhysicalFile(fileSystem);
            GitIndex index = new GitIndex(new MockTracer(), new MockEnlistment(), path, path + ".lock");

            index.Initialize();
            return(index);
        }