diff --git a/GitTfs/Commands/Clone.cs b/GitTfs/Commands/Clone.cs index 43d69ae2..2d614cb8 100644 --- a/GitTfs/Commands/Clone.cs +++ b/GitTfs/Commands/Clone.cs @@ -118,6 +118,8 @@ namespace Sep.Git.Tfs.Commands if (tfsRepositoryPath == GitTfsConstants.TfsRoot) fetch.IgnoreBranches = true; + globals.Repository.SetConfig(GitTfsConstants.IgnoreBranches, fetch.IgnoreBranches.ToString()); + if (retVal == 0) { fetch.Run(withBranches); diff --git a/GitTfs/Commands/Init.cs b/GitTfs/Commands/Init.cs index de48ebe0..7101a52c 100644 --- a/GitTfs/Commands/Init.cs +++ b/GitTfs/Commands/Init.cs @@ -101,6 +101,8 @@ namespace Sep.Git.Tfs.Commands } } + globals.Repository.SetConfig(GitTfsConstants.IgnoreBranches, false.ToString()); + } private string[] BuildInitCommand() diff --git a/GitTfs/Core/GitRepository.cs b/GitTfs/Core/GitRepository.cs index 46134681..505fc478 100644 --- a/GitTfs/Core/GitRepository.cs +++ b/GitTfs/Core/GitRepository.cs @@ -105,6 +105,7 @@ namespace Sep.Git.Tfs.Core return defaultValue; } } + public void SetConfig(string key, string value) { _repository.Config.Set(key, value, ConfigurationLevel.Local);