Exemplo n.º 1
0
        public static void ToStoryBranch(Repository repo, StoryBranchNameDelegate storyBranchNameFn, out Reference headRef)
        {
            var storyBranch = repo.GetStoryBranch(repo.Head, storyBranchNameFn, out var storyBranchName);

            storyBranch = storyBranch ?? repo.CreateBranch(storyBranchName);

            headRef = (repo.Head.Reference as SymbolicReference).Target;
            repo.Refs.UpdateTarget("HEAD", storyBranch.Reference.CanonicalName);
        }
Exemplo n.º 2
0
 public SwitchBranch(Repository repo, StoryBranchNameDelegate storyBranchNameFn)
 {
     this.repo = repo;
     ToStoryBranch(repo, storyBranchNameFn, out headRef);
 }