remhelp

package module
v0.0.2 Latest Latest
Warning

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

Go to latest
Published: Mar 12, 2025 License: MIT Imports: 34 Imported by: 0

README

go-git-remhelp

Git remote helper library

Documentation

Index

Constants

View Source
const MsgFetchObjects = "🐕 Fetching from remote ... "
View Source
const TestProtName = "tap"

Variables

View Source
var GitObjPackDir = filepath.Join("objects", "pack")
View Source
var GitRemoteTapCode string

Functions

func EasyExec

func EasyExec(c string, args ...string) error

func GitRepack

func GitRepack(
	m MetaContext,
	arg GitRepackArg,
) (
	bool,
	error,
)

func IsPackDataFile

func IsPackDataFile(f string) bool

func IsPackIndexFile

func IsPackIndexFile(f string) bool

func LogInput

func LogInput(l DebugLogger, s string)

func LogOutput

func LogOutput(l DebugLogger, s string)

func NewGoGitRepoWithStorage

func NewGoGitRepoWithStorage(stor storage.Storer) (*gogit.Repository, error)

func NewPackSyncStorage

func NewPackSyncStorage(
	s storage.Storer,
	ps *PackSync,
	op GitOpType,
) (storage.Storer, error)

func TermLogMsgFetch

func TermLogMsgFetch(
	ctx context.Context,
	tl TermLogger,
	typ string,
	hash plumbing.Hash,
)

func TermLogf

func TermLogf(
	ctx context.Context,
	t TermLogger,
	opts TermLogBitfield,
	format string,
	args ...interface{},
)

Types

type BadGitPathError

type BadGitPathError struct {
	Path LocalPath
}

func (BadGitPathError) Error

func (e BadGitPathError) Error() string

type BadIndexNameError

type BadIndexNameError struct{}

func (BadIndexNameError) Error

func (e BadIndexNameError) Error() string

type BaseCmd

type BaseCmd struct {
	Output LineOutputter
}

func (*BaseCmd) DoOutput

func (b *BaseCmd) DoOutput(lines []string, err error) error

type BatchedIOLoggedO

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

func (*BatchedIOLoggedO) Next

type BatchedLineIOer

type BatchedLineIOer interface {
	Next(ctx context.Context) (string, LineOutputter, error)
}

func NewBatchedIOLoggedO

func NewBatchedIOLoggedO(
	blio BatchedLineIOer,
	log DebugLogger,
) BatchedLineIOer

type CapabilitiesCmd

type CapabilitiesCmd struct {
	BaseCmd
}

func (*CapabilitiesCmd) Run

func (c *CapabilitiesCmd) Run(m MetaContext) error

type Cmd

type Cmd interface {
	Run(MetaContext) error
	// contains filtered or unexported methods
}

type ComingledIndex

type ComingledIndex struct {
	sync.RWMutex
	Indices map[IndexName]*Index
	Objects map[plumbing.Hash][]*Index
	Newest  time.Time
}

func NewComingledIndex

func NewComingledIndex() *ComingledIndex

func (*ComingledIndex) Absorb

func (c *ComingledIndex) Absorb(idx *Index) error

func (*ComingledIndex) Get

func (c *ComingledIndex) Get(h plumbing.Hash) []*Index

func (*ComingledIndex) NumIndicies

func (c *ComingledIndex) NumIndicies() int

type DebugLogger

type DebugLogger interface {
	Log(s string)
}

type ExecContext

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

func (*ExecContext) DbgLog

func (e *ExecContext) DbgLog() DebugLogger

func (*ExecContext) Storage

func (e *ExecContext) Storage() Storer

func (*ExecContext) TermLog

func (e *ExecContext) TermLog() TermLogger

type FastFetch

type FastFetch struct {
	storage.Storer // remote FOKS storage
	// contains filtered or unexported fields
}

FastFetch is a specialized fetcher that combines a PackSync and low-level go-git access, to provide an optimized fetch backend.

func NewFastFetch

func NewFastFetch(
	m MetaContext,
	args []FetchArg,
) (
	*FastFetch,
	error,
)

func (*FastFetch) EncodedObject

func (f *FastFetch) EncodedObject(
	typ plumbing.ObjectType,
	hash plumbing.Hash,
) (
	plumbing.EncodedObject,
	error,
)

func (*FastFetch) EncodedObjectSize

func (f *FastFetch) EncodedObjectSize(
	hash plumbing.Hash,
) (
	int64,
	error,
)

func (*FastFetch) HasEncodedObject

func (f *FastFetch) HasEncodedObject(
	hash plumbing.Hash,
) error

func (*FastFetch) Run

func (f *FastFetch) Run(m MetaContext) error

type FetchArg

type FetchArg struct {
	Hash plumbing.Hash
	Name plumbing.ReferenceName
}

type FetchCmd

type FetchCmd struct {
	BaseCmd
	Args []FetchArg
}

func (*FetchCmd) Run

func (c *FetchCmd) Run(m MetaContext) error

type GitCmdArg

type GitCmdArg struct {
	Git  string
	Dir  string
	Args []string
}

type GitCmdRes

type GitCmdRes struct {
	Stdout []byte
	Err    error
}

func GitCmd

func GitCmd(
	arg GitCmdArg,
) (*GitCmdRes, error)

func GitRepackAlways

func GitRepackAlways(
	arg GitCmdArg,
) (
	*GitCmdRes,
	error,
)

type GitCountObjectsRes

type GitCountObjectsRes struct {
	Unpacked      int
	Packed        int
	Packs         int
	PrunePackable int
	Garbage       int
}

func GitCountObjects

func GitCountObjects(
	arg GitCmdArg,
) (
	*GitCountObjectsRes,
	error,
)

type GitError

type GitError struct {
	Err  error
	Args []string
	Msg  string
}

func (*GitError) Error

func (g *GitError) Error() string

type GitOpType

type GitOpType int
const (
	GitOpTypePush GitOpType = iota
	GitOpTypeFetch
)

type GitRepackArg

type GitRepackArg struct {
	Git    string
	Dir    string
	Thresh int
	Opts   []string
}

type GitRepoDesc

type GitRepoDesc struct {
	ProtName string
	Host     string
	As       string
	RepoName string
}

func (*GitRepoDesc) Origin

func (d *GitRepoDesc) Origin() string

type Index

type Index struct {
	Name     IndexName
	Filename string
	Sz       int64
	NumObjs  int
	Raw      []byte
	Idx      *idxfile.MemoryIndex
	Ctime    time.Time
}

func (*Index) FullIndexPath

func (i *Index) FullIndexPath() string

func (*Index) PackDataFilename

func (i *Index) PackDataFilename() string

func (*Index) PackIndexFilename

func (i *Index) PackIndexFilename() string

func (*Index) PartialIndexPath

func (i *Index) PartialIndexPath(parent string) string

type IndexName

type IndexName string

func ParsePackIndex

func ParsePackIndex(f string) IndexName

func (IndexName) IsValid

func (n IndexName) IsValid() bool

func (IndexName) IsZero

func (i IndexName) IsZero() bool

func (IndexName) PackDataFilename

func (i IndexName) PackDataFilename() string

func (IndexName) PackIndexFilename

func (i IndexName) PackIndexFilename() string

func (IndexName) String

func (n IndexName) String() string

type InternalError

type InternalError string

func (InternalError) Error

func (e InternalError) Error() string

type LineOutputter

type LineOutputter interface {
	Output([]string, error) error
}

Note that for I/O in this system, the input and ouptut are intertwined. Every line of input may or may not have a corresponding set of output lines. For instance, a capabilities command's first line of input has a corresponding n lines of output, one for each "capabitlity." For a batch command like push, the last line of input (the empty line) has a corresponding set of output, one for each input line, showing results of each push. Hence, the TextInterfacer line source returns a single input line, and a LineOutputter instance that allows the machinery to output 0-n lines of output. OR, the answer might have been an error, in which case, bubble that back up.

type ListCmd

type ListCmd struct {
	BaseCmd
	ForPush bool
	// contains filtered or unexported fields
}

func (*ListCmd) Run

func (c *ListCmd) Run(m MetaContext) error

type LocalCheckoutDir

type LocalCheckoutDir string

func NewLocalCheckDirFromWorkingDirAndGitDir

func NewLocalCheckDirFromWorkingDirAndGitDir(
	wd LocalPath,
	gd LocalPath,
) (
	LocalCheckoutDir,
	error,
)

func NewLocalCheckoutDirFromDotGit

func NewLocalCheckoutDirFromDotGit(p LocalPath) (LocalCheckoutDir, error)

func (LocalCheckoutDir) DotGit

func (l LocalCheckoutDir) DotGit() string

func (LocalCheckoutDir) String

func (l LocalCheckoutDir) String() string

type LocalPath

type LocalPath string

type LocalRepo

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

func NewLocalRepo

func NewLocalRepo() *LocalRepo

func (*LocalRepo) Open

func (r *LocalRepo) Open() error

type LogWrapperOutput

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

func (*LogWrapperOutput) Output

func (l *LogWrapperOutput) Output(lines []string, err error) error

type MemoryStorage

type MemoryStorage struct {
	*MemoryStorageBase
	// contains filtered or unexported fields
}

func (*MemoryStorage) HasEncodedObject

func (s *MemoryStorage) HasEncodedObject(h plumbing.Hash) error

func (*MemoryStorage) List

func (s *MemoryStorage) List() (RefListIter, error)

func (*MemoryStorage) LocalCheckoutDir

func (s *MemoryStorage) LocalCheckoutDir() LocalCheckoutDir

func (*MemoryStorage) Name

func (s *MemoryStorage) Name() RemoteName

func (*MemoryStorage) PackSync

func (s *MemoryStorage) PackSync() *PackSync

func (*MemoryStorage) ToGitStorage

func (s *MemoryStorage) ToGitStorage(op GitOpType) (storage.Storer, error)

func (*MemoryStorage) URL

func (s *MemoryStorage) URL() RemoteURL

type MemoryStorageBase

type MemoryStorageBase struct {
	*memory.Storage
	// contains filtered or unexported fields
}

func NewMemoryStorageBase

func NewMemoryStorageBase(nm RemoteName, url RemoteURL) *MemoryStorageBase

func (*MemoryStorageBase) FetchNewIndices

func (m *MemoryStorageBase) FetchNewIndices(
	ctx context.Context,
	since time.Time,
) (
	[]RawIndex,
	error,
)

func (*MemoryStorageBase) FetchPackData

func (m *MemoryStorageBase) FetchPackData(
	ctx context.Context,
	name IndexName,
	wc io.Writer,
) error

func (*MemoryStorageBase) HasIndex

func (m *MemoryStorageBase) HasIndex(
	ctx context.Context,
	name IndexName,
) (
	bool,
	error,
)

func (*MemoryStorageBase) PushPackData

func (m *MemoryStorageBase) PushPackData(
	ctx context.Context,
	name IndexName,
	rc io.Reader,
) error

func (*MemoryStorageBase) PushPackIndex

func (m *MemoryStorageBase) PushPackIndex(
	ctx context.Context,
	name IndexName,
	rc io.Reader,
) error

func (*MemoryStorageBase) WithLocal

func (m *MemoryStorageBase) WithLocal(
	ps *PackSync,
	lcd LocalCheckoutDir,
) *MemoryStorage

type MemoryStorageFactory

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

func NewMemoryStorageFactory

func NewMemoryStorageFactory() *MemoryStorageFactory

func (*MemoryStorageFactory) New

type MetaContext

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

func NewMetaContext

func NewMetaContext(ctx context.Context, e *ExecContext) MetaContext

func NewMetaContextBackground

func NewMetaContextBackground(e *ExecContext) MetaContext

func (MetaContext) Ctx

func (m MetaContext) Ctx() context.Context

func (MetaContext) DbgLogCmd

func (m MetaContext) DbgLogCmd(s string)

func (MetaContext) DbgLogOutput

func (m MetaContext) DbgLogOutput(s string)

func (MetaContext) DbgLogf

func (m MetaContext) DbgLogf(format string, args ...interface{})

func (MetaContext) E

func (m MetaContext) E() *ExecContext

func (MetaContext) InitPackSyncPush

func (m MetaContext) InitPackSyncPush() error

func (MetaContext) RemoteRepo

func (m MetaContext) RemoteRepo(op GitOpType) (*gogit.Repository, error)

func (MetaContext) Repack

func (m MetaContext) Repack() (bool, error)

func (MetaContext) ReverseRemote

func (m MetaContext) ReverseRemote(
	op GitOpType,
) (
	*ReverseRemote,
	error,
)

func (MetaContext) TermLogStatus

func (m MetaContext) TermLogStatus(err error)

func (MetaContext) TermLogf

func (m MetaContext) TermLogf(opts TermLogBitfield, format string, args ...interface{})

type NilTermLogger

type NilTermLogger struct{}

func (*NilTermLogger) Log

func (n *NilTermLogger) Log(ctx context.Context, t TermLogLine)

type NotImplementedError

type NotImplementedError struct{}

func (NotImplementedError) Error

func (e NotImplementedError) Error() string

type OutputSet

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

func NewOutputSet

func NewOutputSet() *OutputSet

func (*OutputSet) Empty

func (o *OutputSet) Empty() *OutputSet

func (*OutputSet) Len

func (o *OutputSet) Len() int

func (*OutputSet) Line

func (o *OutputSet) Line(v string)

func (*OutputSet) Lines

func (o *OutputSet) Lines(v ...string) *OutputSet

func (*OutputSet) Parts

func (o *OutputSet) Parts(v ...string)

func (*OutputSet) Res

func (o *OutputSet) Res() []string

func (*OutputSet) Vec

func (o *OutputSet) Vec(v []string)

type PackFileGeneric

type PackFileGeneric struct {
	Name IndexName
	Type PackFileType
}

func ParsePackFileGeneric

func ParsePackFileGeneric(f string) *PackFileGeneric

type PackFileType

type PackFileType int
const (
	PackFileTypeNone  PackFileType = 0
	PackFileTypeData  PackFileType = (1 << 0)
	PackFileTypeIndex PackFileType = (1 << 1)
	PackFileTypeBoth  PackFileType = (PackFileTypeData | PackFileTypeIndex)
)

type PackSync

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

func NewPackSync

func NewPackSync(
	rn RemoteName,
	rem PackSyncRemoter,
	localGit *filesystem.Storage,
	dotGitDir billy.Filesystem,
	tl TermLogger,
) *PackSync

func NewPackSyncFromPath

func NewPackSyncFromPath(
	rn RemoteName,
	rem PackSyncRemoter,
	lcd LocalCheckoutDir,
	tl TermLogger,
) (
	*PackSync,
	error,
)

func (*PackSync) InitFastFetch

func (p *PackSync) InitFastFetch(ctx context.Context) error

InitFastFetch initializes the packsync object for a fetch operation. It first builds an index from the on-disk partial indices, then fetches new indices from the server, and finally updates the index with the new indices.

func (*PackSync) InitPush

func (p *PackSync) InitPush(
	m MetaContext,
) error

type PackSyncRemoter

type PackSyncRemoter interface {
	HasIndex(ctx context.Context, name IndexName) (bool, error)
	FetchNewIndices(ctx context.Context, since time.Time) ([]RawIndex, error)
	FetchPackData(ctx context.Context, name IndexName, wc io.Writer) error
	PushPackData(ctx context.Context, name IndexName, rc io.Reader) error
	PushPackIndex(ctx context.Context, name IndexName, rc io.Reader) error
}

type PackSyncStorageBase

type PackSyncStorageBase struct {
	// The *remote* storage that we are fetching from / pushing to
	storage.Storer
	// contains filtered or unexported fields
}

type PackSyncStoragePush

type PackSyncStoragePush struct {
	*PackSyncStorageBase
	// contains filtered or unexported fields
}

func NewPackSyncStoragePush

func NewPackSyncStoragePush(b *PackSyncStorageBase) *PackSyncStoragePush

func (*PackSyncStoragePush) EncodedObject

func (*PackSyncStoragePush) EncodedObjectSize

func (p *PackSyncStoragePush) EncodedObjectSize(h plumbing.Hash) (int64, error)

func (*PackSyncStoragePush) HasEncodedObject

func (p *PackSyncStoragePush) HasEncodedObject(h plumbing.Hash) error

func (*PackSyncStoragePush) SetEncodedObject

func (p *PackSyncStoragePush) SetEncodedObject(
	obj plumbing.EncodedObject,
) (plumbing.Hash, error)

type ParseError

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

func (ParseError) Error

func (e ParseError) Error() string

type Parser

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

func NewParser

func NewParser(tio BatchedLineIOer) *Parser

func (*Parser) Next

func (p *Parser) Next(ctx context.Context) (Cmd, error)

Next returns the next command from the input. On EOF, it returns nil for both the command and the error. For all other errors, it returns nil and the error. Should be called in a loop, like so, more or less:

	for {
	  cmd, err := p.Next()
	  if err != nil {
	    return err
	  }
	  if cmd == nil {
	    break
	 }
}

type PushCmd

type PushCmd struct {
	BaseCmd

	// input args
	Refs []config.RefSpec
	// contains filtered or unexported fields
}

func (*PushCmd) Run

func (c *PushCmd) Run(m MetaContext) error

type RawIndex

type RawIndex struct {
	Name  IndexName
	Data  []byte
	CTime time.Time
}

func (*RawIndex) Import

func (r *RawIndex) Import() (*Index, error)

type RefData

type RefData struct {
	IsDelete bool
	Commits  []*object.Commit
}

RefData stores the data for a ref.

type RefDataByName

type RefDataByName map[plumbing.ReferenceName]*RefData

RefDataByName represents a map of reference names to data about that ref.

type RefListIter

type RefListIter interface {
	HasAnyHashes() bool
	Next() (*plumbing.Reference, error)
	ForEach(func(*plumbing.Reference) error) error
	Close()
}

type RefListSliceIter

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

func NewRefListSliceIter

func NewRefListSliceIter(refs []*plumbing.Reference) *RefListSliceIter

func (*RefListSliceIter) Close

func (r *RefListSliceIter) Close()

func (*RefListSliceIter) ForEach

func (r *RefListSliceIter) ForEach(f func(*plumbing.Reference) error) error

func (*RefListSliceIter) HasAnyHashes

func (r *RefListSliceIter) HasAnyHashes() bool

func (*RefListSliceIter) Next

func (r *RefListSliceIter) Next() (*plumbing.Reference, error)

type RemoteHelper

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

A RemoteHelper takes I/O from git (some via argv, and others via stdin/stdout), and also a storageEngine, and performs the git-remote-helper-protocol. This class is responsible for all of the specifics of fetch/push mechanics, etc. The storage by comparison is dumb.

func NewRemoteHelper

func NewRemoteHelper(
	blio BatchedLineIOer,
	store Storer,
	opts RemoteHelperOptions,
) (*RemoteHelper, error)

func (*RemoteHelper) Run

func (r *RemoteHelper) Run(ctx context.Context) error

type RemoteHelperOptions

type RemoteHelperOptions struct {
	DbgLog           DebugLogger // For development/internal logging
	TermLog          TermLogger  // For user-facing logging (on the terminal)
	GitCmd           string      // optional -- where to find the 'git' command if not the default
	RepackThreshhold int         // optional -- how many loose objects before we pack
}

type RemoteName

type RemoteName string

type RemoteURL

type RemoteURL string

type ReverseRemote

type ReverseRemote struct {
	*gogit.Remote
	// contains filtered or unexported fields
}

func (*ReverseRemote) Name

func (r *ReverseRemote) Name() string

type SimpleBatchedLineIO

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

func NewSimpleBatchedLineIO

func NewSimpleBatchedLineIO(in io.Reader, out io.Writer) *SimpleBatchedLineIO

func (*SimpleBatchedLineIO) Next

type SimpleLineOuputter

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

func (*SimpleLineOuputter) Output

func (s *SimpleLineOuputter) Output(lines []string, err error) error

type StorageWrapper

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

func NewStorageWrapper

func NewStorageWrapper(
	storage storage.Storer,
	nm RemoteName,
	url RemoteURL,
	ps *PackSync,
	lcd LocalCheckoutDir,
) (*StorageWrapper, error)

func (*StorageWrapper) HasEncodedObject

func (w *StorageWrapper) HasEncodedObject(h plumbing.Hash) error

func (*StorageWrapper) List

func (w *StorageWrapper) List() (RefListIter, error)

func (*StorageWrapper) LocalCheckoutDir

func (w *StorageWrapper) LocalCheckoutDir() LocalCheckoutDir

func (*StorageWrapper) Name

func (w *StorageWrapper) Name() RemoteName

func (*StorageWrapper) PackSync

func (w *StorageWrapper) PackSync() *PackSync

func (*StorageWrapper) ToGitStorage

func (w *StorageWrapper) ToGitStorage(op GitOpType) (storage.Storer, error)

func (*StorageWrapper) URL

func (w *StorageWrapper) URL() RemoteURL

type StorageWrapperFactory

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

func (*StorageWrapperFactory) New

type Storer

type Storer interface {
	// For the go-git Storage interface
	ToGitStorage(op GitOpType) (storage.Storer, error)
	PackSync() *PackSync

	List() (RefListIter, error)
	Name() RemoteName
	URL() RemoteURL
	LocalCheckoutDir() LocalCheckoutDir
}

type StorerFactory

type StorerFactory interface {
	New(nm RemoteName, url RemoteURL, lcd LocalCheckoutDir) (Storer, error)
}

type SyncedPack

type SyncedPack struct {
	Name  IndexName
	Index []byte
	Pack  []byte
	Time  time.Time
}

type TermLogBitfield

type TermLogBitfield uint32
const (
	TermLogStd       TermLogBitfield = 0
	TermLogCr        TermLogBitfield = 1
	TermLogNoNewline TermLogBitfield = 2
)

func (TermLogBitfield) ToMsg

func (b TermLogBitfield) ToMsg(msg string) TermLogLine

type TermLogLine

type TermLogLine struct {
	Msg  string
	Opts TermLogBitfield
}

type TermLogger

type TermLogger interface {
	Log(ctx context.Context, t TermLogLine)
}

type TestEnv

type TestEnv struct {
	Dir string
	Bin string

	Sfact    *TestMemoryStorageFactory
	EnvIsSet bool
	Desc     GitRepoDesc
	// contains filtered or unexported fields
}

func NewTestEnv

func NewTestEnv() (*TestEnv, error)

func NewTestEnvWithPrefix

func NewTestEnvWithPrefix(prefix string) (*TestEnv, error)

func (*TestEnv) Cleanup

func (e *TestEnv) Cleanup() error

func (*TestEnv) Init

func (e *TestEnv) Init() error

func (*TestEnv) InitWithDesc

func (e *TestEnv) InitWithDesc(d GitRepoDesc) error

func (*TestEnv) NewScratchRepo

func (e *TestEnv) NewScratchRepo(t *testing.T) *TestScratchRepo

type TestHelper

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

A git-remote-helper that works only in test. It creates a socket and listens on it, expecting the tap process to connect to it. As per that protocol, the first line in the transcript is the command line invocation of the tap process. And then it should work as a typical remote helper.

func NewTestHelper

func NewTestHelper(s string, sfact StorerFactory) *TestHelper

func (*TestHelper) Run

func (t *TestHelper) Run() error

func (*TestHelper) Stop

func (t *TestHelper) Stop() error

type TestLogger

type TestLogger struct {
}

func (*TestLogger) Log

func (t *TestLogger) Log(s string)

type TestMemoryStorageFactory

type TestMemoryStorageFactory struct {
	Last *MemoryStorage
	// contains filtered or unexported fields
}

func NewTestMemoryStorageFactory

func NewTestMemoryStorageFactory() *TestMemoryStorageFactory

func (*TestMemoryStorageFactory) New

type TestScratchRepo

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

func (*TestScratchRepo) Git

func (r *TestScratchRepo) Git(t *testing.T, args ...string)

func (*TestScratchRepo) GitWithErr

func (r *TestScratchRepo) GitWithErr(t *testing.T, args ...string) error

func (*TestScratchRepo) Mkdir

func (r *TestScratchRepo) Mkdir(t *testing.T, name string)

func (*TestScratchRepo) Origin

func (r *TestScratchRepo) Origin() string

func (*TestScratchRepo) ReadFile

func (r *TestScratchRepo) ReadFile(t *testing.T, name string, content string)

func (*TestScratchRepo) ReadFileBinary

func (r *TestScratchRepo) ReadFileBinary(t *testing.T, name string, expected []byte)

func (*TestScratchRepo) ReadFileToString

func (r *TestScratchRepo) ReadFileToString(t *testing.T, name string) string

func (*TestScratchRepo) ReadFileWithErr

func (r *TestScratchRepo) ReadFileWithErr(name string, content string) error

func (*TestScratchRepo) WriteFile

func (r *TestScratchRepo) WriteFile(t *testing.T, name, content string)

func (*TestScratchRepo) WriteFileBinary

func (r *TestScratchRepo) WriteFileBinary(t *testing.T, name string, content []byte)

type UnknownCmd

type UnknownCmd struct {
	BaseCmd
	Cmd string
}

func (*UnknownCmd) Run

func (c *UnknownCmd) Run(m MetaContext) error

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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