execute

package
v10.0.3 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 25, 2023 License: MIT Imports: 12 Imported by: 0

Documentation

Overview

Package execute provides infrastructure to run Git Town that is shared between all Git Town commands.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func EnsureKnownBranchAncestry added in v10.0.3

func EnsureKnownBranchAncestry(branch domain.LocalBranchName, args EnsureKnownBranchAncestryArgs) (domain.BranchTypes, config.Lineage, error)

EnsureKnownBranchAncestry makes sure the lineage for the given branch is known. If needed, it queries the user for missing information. It returns the updated version of all information that is derived from the lineage.

The purpose of this function is to implement proper cache invalidation. It ensures that all information derived from lineage gets updated when the lineage is updated.

func EnsureKnownBranchesAncestry added in v10.0.3

func EnsureKnownBranchesAncestry(args EnsureKnownBranchesAncestryArgs) (domain.BranchTypes, config.Lineage, error)

EnsureKnownBranchesAncestry makes sure the entire repo lineage is known. If needed, it queries the user for missing information. It returns the updated version of all information that is derived from the lineage.

The purpose of this function is to implement proper cache invalidation. It ensures that all information derived from lineage gets updated when the lineage is updated.

func LoadBranches

LoadBranches loads the typically used information about Git branches using a single Git command.

Types

type EnsureKnownBranchAncestryArgs added in v10.0.3

type EnsureKnownBranchAncestryArgs struct {
	AllBranches   domain.BranchInfos
	BranchTypes   domain.BranchTypes
	DefaultBranch domain.LocalBranchName
	Lineage       config.Lineage
	MainBranch    domain.LocalBranchName
	Runner        *git.ProdRunner
}

type EnsureKnownBranchesAncestryArgs added in v10.0.3

type EnsureKnownBranchesAncestryArgs struct {
	AllBranches domain.BranchInfos
	BranchTypes domain.BranchTypes
	Lineage     config.Lineage
	MainBranch  domain.LocalBranchName
	Runner      *git.ProdRunner
}

type LoadBranchesArgs

type LoadBranchesArgs struct {
	Repo                  *OpenRepoResult
	Fetch                 bool
	Verbose               bool
	HandleUnfinishedState bool
	Lineage               config.Lineage
	PushHook              bool
	ValidateIsConfigured  bool
	ValidateNoOpenChanges bool
}

type OpenRepoArgs

type OpenRepoArgs struct {
	Verbose          bool
	DryRun           bool
	OmitBranchNames  bool
	PrintCommands    bool
	ValidateGitRepo  bool
	ValidateIsOnline bool
}

type OpenRepoResult

type OpenRepoResult struct {
	Runner         git.ProdRunner
	RootDir        domain.RepoRootDir
	IsOffline      bool
	ConfigSnapshot undo.ConfigSnapshot
}

func OpenRepo

func OpenRepo(args OpenRepoArgs) (*OpenRepoResult, error)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL