diff --git a/GitTfs/Commands/RemoteOptions.cs b/GitTfs/Commands/RemoteOptions.cs index bef33106..50fcd668 100644 --- a/GitTfs/Commands/RemoteOptions.cs +++ b/GitTfs/Commands/RemoteOptions.cs @@ -17,8 +17,6 @@ namespace Sep.Git.Tfs.Commands { { "ignore-regex=", "a regex of files to ignore", v => IgnoreRegex = v }, - { "no-metadata", "leave out the 'git-tfs-id:' tag in commit messages\nUse this when you're exporting from TFS and don't need to put data back into TFS.", - v => NoMetaData = v != null }, { "u|username=", "TFS username", v => Username = v }, { "p|password=", "TFS password", @@ -29,8 +27,6 @@ namespace Sep.Git.Tfs.Commands public string IgnoreRegex { get; set; } - public bool NoMetaData { get; set; } - public string Username { get; set; } public string Password { get; set; } diff --git a/GitTfs/Core/RemoteConfigConverter.cs b/GitTfs/Core/RemoteConfigConverter.cs index 3f5dbc6d..1cf4a922 100644 --- a/GitTfs/Core/RemoteConfigConverter.cs +++ b/GitTfs/Core/RemoteConfigConverter.cs @@ -28,8 +28,6 @@ namespace Sep.Git.Tfs.Core remote.Password = entry.Value; else if (key == "ignore-paths") remote.IgnoreRegex = entry.Value; - else if (key == "no-meta-data") - remote.NoMetaData = entry.Value.ToLower() != "false"; else if (key == "legacy-urls") remote.Aliases = entry.Value.Split(','); else if (key == "autotag") @@ -49,7 +47,6 @@ namespace Sep.Git.Tfs.Core yield return c(prefix + "username", remote.Username); yield return c(prefix + "password", remote.Password); yield return c(prefix + "ignore-paths", remote.IgnoreRegex); - yield return c(prefix + "no-meta-data", remote.NoMetaData ? "true" : null); yield return c(prefix + "legacy-urls", remote.Aliases == null ? null : string.Join(",", remote.Aliases)); yield return c(prefix + "autotag", remote.Autotag ? "true" : null); } diff --git a/GitTfs/Core/RemoteInfo.cs b/GitTfs/Core/RemoteInfo.cs index 70c64a22..9b323019 100644 --- a/GitTfs/Core/RemoteInfo.cs +++ b/GitTfs/Core/RemoteInfo.cs @@ -14,14 +14,13 @@ namespace Sep.Git.Tfs.Core public string Username { get; set; } public string Password { get; set; } public string IgnoreRegex { get; set; } - public bool NoMetaData { get; set; } public IEnumerable Aliases { get; set; } public bool Autotag { get; set; } public RemoteOptions RemoteOptions { - get { return new RemoteOptions { IgnoreRegex = IgnoreRegex, NoMetaData = NoMetaData, Username = Username, Password = Password }; } - set { IgnoreRegex = value.IgnoreRegex; NoMetaData = value.NoMetaData; Username = value.Username; Password = value.Password; } + get { return new RemoteOptions { IgnoreRegex = IgnoreRegex, Username = Username, Password = Password }; } + set { IgnoreRegex = value.IgnoreRegex; Username = value.Username; Password = value.Password; } } } } diff --git a/GitTfsTest/Core/RemoteConfigConverterDumpTests.cs b/GitTfsTest/Core/RemoteConfigConverterDumpTests.cs index d0e2681d..ed3935b4 100644 --- a/GitTfsTest/Core/RemoteConfigConverterDumpTests.cs +++ b/GitTfsTest/Core/RemoteConfigConverterDumpTests.cs @@ -33,7 +33,6 @@ namespace Sep.Git.Tfs.Test.Core AssertContainsConfig("tfs-remote.default.repository", "$/Project", config); AssertContainsConfig("tfs-remote.default.username", null, config); AssertContainsConfig("tfs-remote.default.password", null, config); - AssertContainsConfig("tfs-remote.default.no-meta-data", null, config); AssertContainsConfig("tfs-remote.default.ignore-paths", null, config); AssertContainsConfig("tfs-remote.default.legacy-urls", null, config); AssertContainsConfig("tfs-remote.default.autotag", null, config); @@ -49,7 +48,6 @@ namespace Sep.Git.Tfs.Test.Core Username = "user", Password = "pass", IgnoreRegex = "abc", - NoMetaData = true, Autotag = true, Aliases = new string[] { "http://abc", "http://def" }, }; @@ -58,7 +56,6 @@ namespace Sep.Git.Tfs.Test.Core AssertContainsConfig("tfs-remote.default.repository", "$/Project", config); AssertContainsConfig("tfs-remote.default.username", "user", config); AssertContainsConfig("tfs-remote.default.password", "pass", config); - AssertContainsConfig("tfs-remote.default.no-meta-data", "true", config); AssertContainsConfig("tfs-remote.default.ignore-paths", "abc", config); AssertContainsConfig("tfs-remote.default.legacy-urls", "http://abc,http://def", config); AssertContainsConfig("tfs-remote.default.autotag", "true", config); diff --git a/GitTfsTest/Core/RemoteConfigConverterLoadTests.cs b/GitTfsTest/Core/RemoteConfigConverterLoadTests.cs index f745e998..7c145663 100644 --- a/GitTfsTest/Core/RemoteConfigConverterLoadTests.cs +++ b/GitTfsTest/Core/RemoteConfigConverterLoadTests.cs @@ -46,7 +46,6 @@ namespace Sep.Git.Tfs.Test.Core Assert.Null(_firstRemote.Username); Assert.Null(_firstRemote.Password); Assert.Null(_firstRemote.IgnoreRegex); - Assert.False(_firstRemote.NoMetaData); } void SetUpCompleteRemote() @@ -54,7 +53,6 @@ namespace Sep.Git.Tfs.Test.Core SetUpMinimalRemote(); _config["tfs-remote.default.username"] = "theuser"; _config["tfs-remote.default.password"] = "thepassword"; - _config["tfs-remote.default.no-meta-data"] = "true"; _config["tfs-remote.default.ignore-paths"] = "ignorethis.zip"; _config["tfs-remote.default.legacy-urls"] = "http://old:8080/,http://other/"; _config["tfs-remote.default.autotag"] = "true"; @@ -70,25 +68,8 @@ namespace Sep.Git.Tfs.Test.Core Assert.Equal("theuser", _firstRemote.Username); Assert.Equal("thepassword", _firstRemote.Password); Assert.Equal("ignorethis.zip", _firstRemote.IgnoreRegex); - Assert.True(_firstRemote.NoMetaData); Assert.Equal(new string[] { "http://old:8080/", "http://other/" }, _firstRemote.Aliases); Assert.True(_firstRemote.Autotag); } - - [Fact] - public void NoMetaDataCanBe_1() - { - SetUpMinimalRemote(); - _config["tfs-remote.default.no-meta-data"] = "1"; - Assert.True(_firstRemote.NoMetaData); - } - - [Fact] - public void NoMetaDataCanBe_false() - { - SetUpMinimalRemote(); - _config["tfs-remote.default.no-meta-data"] = "false"; - Assert.False(_firstRemote.NoMetaData); - } } } diff --git a/docs/config.md b/docs/config.md index 0ad4000e..25e0744e 100644 --- a/docs/config.md +++ b/docs/config.md @@ -51,7 +51,3 @@ key for the remote `default` is `tfs-remote.default.url`. can be set to `true` to make git-tfs create a tag for each TFS commit. This is disabled by default, because creating a lot of tags will slow down your git operations. -* `no-meta-data` - does nothing. It formerly controlled whether TFS meta-data - (the `git-tfs-id` field) was added to commit messages during - fetch.