@@ -27,6 +27,7 @@ public VersionVariables ExecuteGitVersion(string targetUrl, string dynamicReposi
2727 var buildServer = applicableBuildServers . FirstOrDefault ( ) ;
2828 var fetch = noFetch || ( buildServer != null && buildServer . PreventFetch ( ) ) ;
2929 var gitPreparer = new GitPreparer ( targetUrl , dynamicRepositoryLocation , authentication , fetch , workingDirectory ) ;
30+ gitPreparer . Initialise ( buildServer != null , ResolveCurrentBranch ( buildServer , targetBranch , ! string . IsNullOrWhiteSpace ( dynamicRepositoryLocation ) ) ) ;
3031 var dotGitDirectory = gitPreparer . GetDotGitDirectory ( ) ;
3132 var projectRoot = gitPreparer . GetProjectRootDirectory ( ) ;
3233
@@ -42,7 +43,8 @@ public VersionVariables ExecuteGitVersion(string targetUrl, string dynamicReposi
4243 // },
4344 // Directory = workingDirectory
4445 //});
45- Logger . WriteInfo ( string . Format ( "Project root is: " + projectRoot ) ) ;
46+ Logger . WriteInfo ( string . Format ( "Project root is: {0}" , projectRoot ) ) ;
47+ Logger . WriteInfo ( string . Format ( "DotGit directory is: {0}" , dotGitDirectory ) ) ;
4648 if ( string . IsNullOrEmpty ( dotGitDirectory ) || string . IsNullOrEmpty ( projectRoot ) )
4749 {
4850 // TODO Link to wiki article
@@ -92,8 +94,6 @@ static string ResolveCurrentBranch(IBuildServer buildServer, string targetBranch
9294
9395 VersionVariables ExecuteInternal ( string targetBranch , string commitId , IRepository repo , GitPreparer gitPreparer , string projectRoot , IBuildServer buildServer , Config overrideConfig = null )
9496 {
95- gitPreparer . Initialise ( buildServer != null , ResolveCurrentBranch ( buildServer , targetBranch , gitPreparer . IsDynamicGitRepository ) ) ;
96-
9797 var versionFinder = new GitVersionFinder ( ) ;
9898 var configuration = ConfigurationProvider . Provide ( projectRoot , fileSystem , overrideConfig : overrideConfig ) ;
9999
0 commit comments