<commit_before>﻿using Octokit.Helpers;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Xunit;

namespace Octokit.Tests.Integration.Helpers
{
    public class ReferenceExtensionsTests
    {
        [IntegrationTest]
        public async Task CreateABranch()
        {
            var client = Helper.GetAuthenticatedClient();
            var fixture = client.Git.Reference;

            using (var context = await client.CreateRepositoryContext("public-repo"))
            {
                var branchFromMaster = await fixture.CreateBranch(context.RepositoryOwner, context.RepositoryName, "patch-1");

                var branchFromPath = await fixture.CreateBranch(context.RepositoryOwner, context.RepositoryName, "patch-2", branchFromMaster);

                var allBranchNames = (await client.Repository.GetAllBranches(context.RepositoryOwner, context.RepositoryName)).Select(b => b.Name);

                Assert.Contains("patch-1", allBrancheNames);
                Assert.Contains("patch-2", allBrancheNames);
            }<commit_msg>IDEs do not prevent stupid<commit_after>﻿using Octokit.Helpers;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Xunit;

namespace Octokit.Tests.Integration.Helpers
{
    public class ReferenceExtensionsTests
    {
        [IntegrationTest]
        public async Task CreateABranch()
        {
            var client = Helper.GetAuthenticatedClient();
            var fixture = client.Git.Reference;

            using (var context = await client.CreateRepositoryContext("public-repo"))
            {
                var branchFromMaster = await fixture.CreateBranch(context.RepositoryOwner, context.RepositoryName, "patch-1");

                var branchFromPath = await fixture.CreateBranch(context.RepositoryOwner, context.RepositoryName, "patch-2", branchFromMaster);

                var allBranchNames = (await client.Repository.GetAllBranches(context.RepositoryOwner, context.RepositoryName)).Select(b => b.Name);

                Assert.Contains("patch-1", allBranchNames);
                Assert.Contains("patch-2", allBranchNames);
            }
{'fraction_non_alphanumeric': 0.09451627284886313, 'fraction_numerical': 0.0035666518056174765, 'mean_word_length': 2.9857904085257547, 'pattern_counts': {'":': 0, '<': 3, '<?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': '5394393', 'n_tokens_mistral': 570, 'n_tokens_neox': 566, 'n_words': 120}