git

package
v0.0.0-...-8140d1e Latest Latest
Warning

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

Go to latest
Published: Jun 17, 2025 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Manager

type Manager struct {
	// contains filtered or unexported fields
}

func CreateGitManager

func CreateGitManager(releaseBranch, number string, ct changetype.ChangeType) (*Manager, error)

CreateGitManager creates

func (*Manager) Abandon

func (gm *Manager) Abandon() error

Abandon checks out the git branch that it was on before the creation the Manager, and deletes the branch that was checked out when the Manager was created. No changes are dealt with. IMPORTANT!! Due to the logic around git branches, the Manager will be effectively useless after running this command, as the changes branch will be deleted.

func (*Manager) AddAndCommit

func (gm *Manager) AddAndCommit(ap values.AbsolutePath) error

AddAndCommit adds and commits presumed changes for provided ap. There is no check to see if this file has actually changed.

func (*Manager) AddAndCommitDirectory

func (gm *Manager) AddAndCommitDirectory(nd values.NewDirectory) error

AddAndCommitDirectory adds and commits presumed changes for provided nd. There is no check to see if any filed in the directory have actually changed. All changes to directory are

func (*Manager) DeleteDirectoryAndAbandonAllChanges

func (gm *Manager) DeleteDirectoryAndAbandonAllChanges(nd *values.NewDirectory) error

DeleteDirectoryAndAbandonAllChanges deletes provided directory and all files in it, checks out the git branch that it was on before the creation the Manager, and deletes the branch that was checked out when the Manager was created and that all the subsequent changes have been added/committed to. IMPORTANT!! Due to the logic around git branches, the Manager will be effectively useless after running this command, as the changes branch will be deleted.

func (*Manager) OpenPR

func (gm *Manager) OpenPR() error

func (*Manager) RestoreFileAndAbandonAllChanges

func (gm *Manager) RestoreFileAndAbandonAllChanges(ap values.AbsolutePath) []error

RestoreFileAndAbandonAllChanges restores any changes made to provided filepath, checks out the git branch that it was on before the creation the Manager, and deletes the branch that was checked out when the Manager was created and that all the subsequent changes have been added/committed to. IMPORTANT!! Due to the logic around git branches, the Manager will be effectively useless after running this command, as the changes branch will be deleted.

Jump to

Keyboard shortcuts

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