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:
@@ -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();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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);
|
||||
|
||||
@@ -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";
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user