internalrefs

package
v1.42.0 Latest Latest
Warning

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

Go to latest
Published: May 6, 2019 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Cleaner

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

Cleaner is responsible for updating the internal references in a repository as specified by a BFG object map. Currently, internal references pointing to a commit that has been rewritten will simply be removed.

func NewCleaner

func NewCleaner(ctx context.Context, repo *gitalypb.Repository, forEach ForEachFunc) (*Cleaner, error)

NewCleaner builds a new instance of Cleaner, which is used to apply a BFG object map to a repository.

func (*Cleaner) ApplyObjectMap

func (c *Cleaner) ApplyObjectMap(reader io.Reader) error

ApplyObjectMap processes a BFG object map file, removing any internal references that point to a rewritten commit.

type ErrInvalidObjectMap

type ErrInvalidObjectMap error

ErrInvalidObjectMap is returned with descriptive text if the supplied object map file is in the wrong format

type ForEachFunc added in v1.41.0

type ForEachFunc func(oldOID, newOID string, isInternalRef bool) error

A ForEachFunc can be called for every entry in the BFG object map file that the cleaner is processing. Returning an error will stop the cleaner before it has processed the entry in question

Jump to

Keyboard shortcuts

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