Documentation
¶
Overview ¶
Package vcstest builds the local git repository the replay tests of every backend share: a dependent branch whose parent was integrated upstream as a squash.
Index ¶
Constants ¶
const ChildAuthor = "Child Author <child@example.com>"
ChildAuthor is the author of the child branch's commits, which a replay keeps.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Stack ¶
type Stack struct {
Dir string
// OldBase is the parent's tip, where the child was started from; Head
// the child's tip; Onto main's tip, the new upstream.
OldBase, Head, Onto string
// Parent and Child are the commits of each branch, oldest first.
Parent, Child []string
// ChildMessages are the child's commit messages, oldest first.
ChildMessages []string
}
Stack is the repository: main, a parent branch of two commits started from it, a child branch of two commits started from the parent, and main again with the parent squashed onto it and one more commit.
func NewStack ¶
NewStack builds the repository in a temporary directory, with the child branch checked out. With conflict, main's last commit changes a.txt and b.txt, which the child's first commit changes too, and c.txt, which its second commit changes.
func (*Stack) Git ¶
Git runs git in the stack's directory, with no configuration of the machine's, and returns its output.