<commit_before>namespace GitVersionCore.Tests.IntegrationTests
{
    using System.Collections.Generic;
    using System.Linq;

    using GitTools.Testing;

    using GitVersion;

    using GitVersionCore.Tests;

    using LibGit2Sharp;

    using NUnit.Framework;

    [TestFixture]
    public class VersionInCurrentBranchNameScenarios : TestBase
    {
        [Test]
        public void TakesVersionFromNameOfReleaseBranch()
        {
            using (var fixture = new BaseGitFlowRepositoryFixture("1.0.0"))
            {
                fixture.BranchTo("release/2.0.0");

                fixture.AssertFullSemver("2.0.0-beta.1+0");
            }
        }

        [Test]
        public void DoesNotTakeVersionFromNameOfNonReleaseBranch()
        {
            using (var fixture = new BaseGitFlowRepositoryFixture("1.0.0"))
            {
                fixture.BranchTo("feature/upgrade-power-level-to-9000.0.1");

                fixture.AssertFullSemver("1.1.0-upgrade-power-level-to-9000-0-1.1+1");
            }
        }

        [Test]
        public void TakesVersionFromNameOfBranchThatIsReleaseByConfig()
        {
            var config = new Config
            {
                Branches = new Dictionary<string, BranchConfig> { { "support", new BranchConfig { IsReleaseBranch = true } } }
            };

            using (var fixture = new BaseGitFlowRepositoryFixture("1.0.0"))
            {
                fixture.BranchTo("support/2.0.0");

                fixture.AssertFullSemver(config, "2.0.0+1");
            }
        }

        [Test]
        public void TakesVersionFromNameOfRemoteReleaseBranch()
        {
            using (var fixture = new RemoteRepositoryFixture())
            {
                fixture.BranchTo("release/2.0.0");
                fixture.MakeACommit();
                Commands.Fetch((Repository)fixture.LocalRepositoryFixture.Repository, fixture.LocalRepositoryFixture.Repository.Network.Remotes.First().Name, new string[0], new FetchOptions(), null);

                fixture.LocalRepositoryFixture.Checkout("origin/release/2.0.0");

                fixture.LocalRepositoryFixture.AssertFullSemver("2.0.0-beta.1+1");
            }
        }
    }
}<commit_msg>tests if custom remotes are ignored when taking version from current branch name<commit_after>namespace GitVersionCore.Tests.IntegrationTests
{
    using System.Collections.Generic;
    using System.Linq;

    using GitTools.Testing;

    using GitVersion;

    using GitVersionCore.Tests;

    using LibGit2Sharp;

    using NUnit.Framework;

    [TestFixture]
    public class VersionInCurrentBranchNameScenarios : TestBase
    {
        [Test]
        public void TakesVersionFromNameOfReleaseBranch()
        {
            using (var fixture = new BaseGitFlowRepositoryFixture("1.0.0"))
            {
                fixture.BranchTo("release/2.0.0");

                fixture.AssertFullSemver("2.0.0-beta.1+0");
            }
        }

        [Test]
        public void DoesNotTakeVersionFromNameOfNonReleaseBranch()
        {
            using (var fixture = new BaseGitFlowRepositoryFixture("1.0.0"))
            {
                fixture.BranchTo("feature/upgrade-power-level-to-9000.0.1");

                fixture.AssertFullSemver("1.1.0-upgrade-power-level-to-9000-0-1.1+1");
            }
        }

        [Test]
        public void TakesVersionFromNameOfBranchThatIsReleaseByConfig()
        {
            var config = new Config
            {
                Branches = new Dictionary<string, BranchConfig> { { "support", new BranchConfig { IsReleaseBranch = true } } }
            };

            using (var fixture = new BaseGitFlowRepositoryFixture("1.0.0"))
            {
                fixture.BranchTo("support/2.0.0");

                fixture.AssertFullSemver(config, "2.0.0+1");
            }
        }

        [Test]
        public void TakesVersionFromNameOfRemoteReleaseBranchInOrigin()
        {
            using (var fixture = new RemoteRepositoryFixture())
            {
                fixture.BranchTo("release/2.0.0");
                fixture.MakeACommit();
                Commands.Fetch((Repository)fixture.LocalRepositoryFixture.Repository, fixture.LocalRepositoryFixture.Repository.Network.Remotes.First().Name, new string[0], new FetchOptions(), null);

                fixture.LocalRepositoryFixture.Checkout("origin/release/2.0.0");

                fixture.LocalRepositoryFixture.AssertFullSemver("2.0.0-beta.1+1");
            }
        }

        [Test]
        public void DoesNotTakeVersionFromNameOfRemoteReleaseBranchInCustomRemote()
        {
            using (var fixture = new RemoteRepositoryFixture())
            {
                fixture.LocalRepositoryFixture.Repository.Network.Remotes.Rename("origin", "upstream");
                fixture.BranchTo("release/2.0.0");
                fixture.MakeACommit();
                Commands.Fetch((Repository)fixture.LocalRepositoryFixture.Repository, fixture.LocalRepositoryFixture.Repository.Network.Remotes.First().Name, new string[0], new FetchOptions(), null);

                fixture.LocalRepositoryFixture.Checkout("upstream/release/2.0.0");

                fixture.LocalRepositoryFixture.AssertFullSemver("0.1.0-beta.1+5");
            }
        }
    }
}
{'fraction_non_alphanumeric': 0.10554189521467751, 'fraction_numerical': 0.022697181766597314, 'mean_word_length': 2.0182648401826486, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3406311', 'n_tokens_mistral': 1495, 'n_tokens_neox': 1460, 'n_words': 210}