@@ -27,6 +27,7 @@ public VersionVariables ExecuteGitVersion(string targetUrl, string dynamicReposi
27
27
var buildServer = applicableBuildServers . FirstOrDefault ( ) ;
28
28
var fetch = noFetch || ( buildServer != null && buildServer . PreventFetch ( ) ) ;
29
29
var gitPreparer = new GitPreparer ( targetUrl , dynamicRepositoryLocation , authentication , fetch , workingDirectory ) ;
30
+ gitPreparer . Initialise ( buildServer != null , ResolveCurrentBranch ( buildServer , targetBranch , ! string . IsNullOrWhiteSpace ( dynamicRepositoryLocation ) ) ) ;
30
31
var dotGitDirectory = gitPreparer . GetDotGitDirectory ( ) ;
31
32
var projectRoot = gitPreparer . GetProjectRootDirectory ( ) ;
32
33
@@ -42,7 +43,8 @@ public VersionVariables ExecuteGitVersion(string targetUrl, string dynamicReposi
42
43
// },
43
44
// Directory = workingDirectory
44
45
//});
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 ) ) ;
46
48
if ( string . IsNullOrEmpty ( dotGitDirectory ) || string . IsNullOrEmpty ( projectRoot ) )
47
49
{
48
50
// TODO Link to wiki article
@@ -92,8 +94,6 @@ static string ResolveCurrentBranch(IBuildServer buildServer, string targetBranch
92
94
93
95
VersionVariables ExecuteInternal ( string targetBranch , string commitId , IRepository repo , GitPreparer gitPreparer , string projectRoot , IBuildServer buildServer , Config overrideConfig = null )
94
96
{
95
- gitPreparer . Initialise ( buildServer != null , ResolveCurrentBranch ( buildServer , targetBranch , gitPreparer . IsDynamicGitRepository ) ) ;
96
-
97
97
var versionFinder = new GitVersionFinder ( ) ;
98
98
var configuration = ConfigurationProvider . Provide ( projectRoot , fileSystem , overrideConfig : overrideConfig ) ;
99
99
0 commit comments