Introduce a config value GitTfsConstants.AutoInitBranches

...to know if we should auto init branch when merge is encountered
 and the branch not actualy initialized
This commit is contained in:
Philippe Miossec
2014-01-05 16:57:08 +01:00
parent f759c4da71
commit 56fc7fd542
3 changed files with 6 additions and 0 deletions
+2
View File
@@ -120,6 +120,8 @@ namespace Sep.Git.Tfs.Commands
if (withBranches && initBranch != null)
{
initBranch.CloneAllBranches = true;
globals.Repository.SetConfig(GitTfsConstants.AutoInitBranches, true.ToString());
retVal = initBranch.Run();
}
}
+2
View File
@@ -169,6 +169,8 @@ namespace Sep.Git.Tfs.Commands
return GitTfsExitCodes.Help;
}
_globals.Repository.SetConfig(GitTfsConstants.AutoInitBranches, true.ToString());
var defaultRemote = InitFromDefaultRemote();
var rootBranch = defaultRemote.Tfs.GetRootTfsBranchForRemotePath(defaultRemote.TfsRepositoryPath);
+2
View File
@@ -62,5 +62,7 @@ namespace Sep.Git.Tfs
public const string WorkspaceConfigKey = GitTfsPrefix + ".workspace-dir";
public const string WorkItemAssociateRegexConfigKey = GitTfsPrefix + ".work-item-regex";
public const string AutoInitBranches = GitTfsPrefix + ".auto-init-branch";
}
}