Documentation ¶
Index ¶
- Constants
- Variables
- func AddWorktree(t testing.TB, cfg config.Cfg, repoPath string, worktreeName string)
- func AddWorktreeArgs(repoPath, worktreeName string) []string
- func AuthorEqual(t testing.TB, expected *gitalypb.CommitAuthor, actual *gitalypb.CommitAuthor)
- func CaptureHookEnv(t testing.TB) (string, func())
- func CloneBenchRepo(t testing.TB, cfg config.Cfg) (repo *gitalypb.Repository, repoPath string, cleanup func())
- func CloneRepoAtStorage(t testing.TB, cfg config.Cfg, storage config.Storage, relativePath string) (*gitalypb.Repository, string, testhelper.Cleanup)
- func CloneRepoAtStorageRoot(t testing.TB, cfg config.Cfg, storageRoot, relativePath string) *gitalypb.Repository
- func CloneRepoWithWorktreeAtStorage(t testing.TB, cfg config.Cfg, storage config.Storage) (*gitalypb.Repository, string, testhelper.Cleanup)
- func CommitEqual(t testing.TB, expected, actual *gitalypb.GitCommit)
- func CreateCommitInAlternateObjectDirectory(t testing.TB, gitBin, repoPath, altObjectsDir string, cmd *exec.Cmd) (currentHead []byte)
- func CreateRemoteBranch(t testing.TB, cfg config.Cfg, repoPath, remoteName, branchName, ref string)
- func CreateTag(t testing.TB, cfg config.Cfg, repoPath, tagName, targetID string, ...) string
- func EnableGitProtocolV2Support(t testing.TB, cfg config.Cfg) (func() string, config.Cfg)
- func Exec(t testing.TB, cfg config.Cfg, args ...string) []byte
- func ExecStream(t testing.TB, cfg config.Cfg, stream io.Reader, args ...string) []byte
- func GetGitObjectDirSize(t testing.TB, repoPath string) int64
- func GetGitPackfileDirSize(t testing.TB, repoPath string) int64
- func GitObjectMustExist(t testing.TB, gitBin, repoPath, sha string)
- func GitObjectMustNotExist(t testing.TB, gitBin, repoPath, sha string)
- func GitServer(t testing.TB, cfg config.Cfg, repoPath string, ...) (int, func() error)
- func InitBareRepoAt(t testing.TB, cfg config.Cfg, storage config.Storage) (*gitalypb.Repository, string, func())
- func InitRepoDir(t testing.TB, storagePath, relativePath string) *gitalypb.Repository
- func InitRepoWithWorktreeAtStorage(t testing.TB, cfg config.Cfg, storage config.Storage) (*gitalypb.Repository, string, func())
- func NewObjectPoolName(t testing.TB) string
- func NewRepositoryName(t testing.TB, bare bool) string
- func RemoteExists(t testing.TB, cfg config.Cfg, repoPath string, remoteName string) bool
- func RemoteUploadPackServer(ctx context.Context, t *testing.T, ...) (*httptest.Server, string)
- func RequireTree(t testing.TB, cfg config.Cfg, repoPath, treeish string, ...)
- func TestBitmapHasHashcache(t *testing.T, bitmap string)
- func TestDeltaIslands(t *testing.T, cfg config.Cfg, repoPath string, repack func() error)
- func TestRepository(t *testing.T, cfg config.Cfg, ...)
- func WriteBlob(t testing.TB, cfg config.Cfg, testRepoPath string, contents []byte) git.ObjectID
- func WriteBlobs(t testing.TB, cfg config.Cfg, testRepoPath string, n int) []string
- func WriteCheckNewObjectExistsHook(t testing.TB, gitBin, repoPath string)
- func WriteCommit(t testing.TB, cfg config.Cfg, repoPath string, opts ...WriteCommitOption) git.ObjectID
- func WriteCustomHook(t testing.TB, repoPath, name string, content []byte)
- func WriteEnvToCustomHook(t testing.TB, repoPath, hookName string) string
- func WritePktlineDelim(t *testing.T, writer io.Writer)
- func WritePktlineFlush(t *testing.T, writer io.Writer)
- func WritePktlineString(t *testing.T, writer io.Writer, data string)
- func WriteTree(t testing.TB, cfg config.Cfg, repoPath string, entries []TreeEntry) git.ObjectID
- type CreateTagOpts
- type TreeEntry
- type WriteCommitOption
Constants ¶
const ( // GlRepository is the default repository name for newly created test // repos. GlRepository = "project-1" // GlProjectPath is the default project path for newly created test // repos. GlProjectPath = "gitlab-org/gitlab-test" )
const ( // GlID is the ID of the default user. GlID = "user-123" // Timezone is the Timezone of the default user. Timezone = "Asia/Shanghai" // TimezoneOffset is ISO 8601-like format of the default user Timezone. TimezoneOffset = "+0800" )
Variables ¶
var CommitsByID = map[string]*gitalypb.GitCommit{ "0031876facac3f2b2702a0e53a26e89939a42209": &gitalypb.GitCommit{ Id: "0031876facac3f2b2702a0e53a26e89939a42209", Subject: []byte("Merge branch 'few-commits-4' into few-commits-2"), Body: []byte("Merge branch 'few-commits-4' into few-commits-2\n"), Author: ahmadSherif(1500320762), Committer: ahmadSherif(1500320762), ParentIds: []string{ "bf6e164cac2dc32b1f391ca4290badcbe4ffc5fb", "48ca272b947f49eee601639d743784a176574a09", }, BodySize: 48, TreeId: "91639b9835ff541f312fd2735f639a50bf35d472", }, "48ca272b947f49eee601639d743784a176574a09": &gitalypb.GitCommit{ Id: "48ca272b947f49eee601639d743784a176574a09", Subject: []byte("Commit #9 alternate"), Body: []byte("Commit #9 alternate\n"), Author: ahmadSherif(1500320271), Committer: ahmadSherif(1500320271), ParentIds: []string{"335bc94d5b7369b10251e612158da2e4a4aaa2a5"}, BodySize: 20, TreeId: "91639b9835ff541f312fd2735f639a50bf35d472", }, "335bc94d5b7369b10251e612158da2e4a4aaa2a5": &gitalypb.GitCommit{ Id: "335bc94d5b7369b10251e612158da2e4a4aaa2a5", Subject: []byte("Commit #8 alternate"), Body: []byte("Commit #8 alternate\n"), Author: ahmadSherif(1500320269), Committer: ahmadSherif(1500320269), ParentIds: []string{"1039376155a0d507eba0ea95c29f8f5b983ea34b"}, BodySize: 20, TreeId: "91639b9835ff541f312fd2735f639a50bf35d472", }, "bf6e164cac2dc32b1f391ca4290badcbe4ffc5fb": &gitalypb.GitCommit{ Id: "bf6e164cac2dc32b1f391ca4290badcbe4ffc5fb", Subject: []byte("Commit #10"), Body: []byte("Commit #10\n"), Author: ahmadSherif(1500320272), Committer: ahmadSherif(1500320272), ParentIds: []string{"9d526f87b82e2b2fd231ca44c95508e5e85624ca"}, BodySize: 11, TreeId: "91639b9835ff541f312fd2735f639a50bf35d472", }, "9d526f87b82e2b2fd231ca44c95508e5e85624ca": &gitalypb.GitCommit{ Id: "9d526f87b82e2b2fd231ca44c95508e5e85624ca", Subject: []byte("Commit #9"), Body: []byte("Commit #9\n"), Author: ahmadSherif(1500320270), Committer: ahmadSherif(1500320270), ParentIds: []string{"1039376155a0d507eba0ea95c29f8f5b983ea34b"}, BodySize: 10, TreeId: "91639b9835ff541f312fd2735f639a50bf35d472", }, "1039376155a0d507eba0ea95c29f8f5b983ea34b": &gitalypb.GitCommit{ Id: "1039376155a0d507eba0ea95c29f8f5b983ea34b", Subject: []byte("Commit #8"), Body: []byte("Commit #8\n"), Author: ahmadSherif(1500320268), Committer: ahmadSherif(1500320268), ParentIds: []string{"54188278422b1fa877c2e71c4e37fc6640a58ad1"}, BodySize: 10, TreeId: "91639b9835ff541f312fd2735f639a50bf35d472", }, "54188278422b1fa877c2e71c4e37fc6640a58ad1": &gitalypb.GitCommit{ Id: "54188278422b1fa877c2e71c4e37fc6640a58ad1", Subject: []byte("Commit #7"), Body: []byte("Commit #7\n"), Author: ahmadSherif(1500320266), Committer: ahmadSherif(1500320266), ParentIds: []string{"8b9270332688d58e25206601900ee5618fab2390"}, BodySize: 10, TreeId: "91639b9835ff541f312fd2735f639a50bf35d472", }, "8b9270332688d58e25206601900ee5618fab2390": &gitalypb.GitCommit{ Id: "8b9270332688d58e25206601900ee5618fab2390", Subject: []byte("Commit #6"), Body: []byte("Commit #6\n"), Author: ahmadSherif(1500320264), Committer: ahmadSherif(1500320264), ParentIds: []string{"f9220df47bce1530e90c189064d301bfc8ceb5ab"}, BodySize: 10, TreeId: "91639b9835ff541f312fd2735f639a50bf35d472", }, "f9220df47bce1530e90c189064d301bfc8ceb5ab": &gitalypb.GitCommit{ Id: "f9220df47bce1530e90c189064d301bfc8ceb5ab", Subject: []byte("Commit #5"), Body: []byte("Commit #5\n"), Author: ahmadSherif(1500320262), Committer: ahmadSherif(1500320262), ParentIds: []string{"40d408f89c1fd26b7d02e891568f880afe06a9f8"}, BodySize: 10, TreeId: "91639b9835ff541f312fd2735f639a50bf35d472", }, "40d408f89c1fd26b7d02e891568f880afe06a9f8": &gitalypb.GitCommit{ Id: "40d408f89c1fd26b7d02e891568f880afe06a9f8", Subject: []byte("Commit #4"), Body: []byte("Commit #4\n"), Author: ahmadSherif(1500320260), Committer: ahmadSherif(1500320260), ParentIds: []string{"df914c609a1e16d7d68e4a61777ff5d6f6b6fde3"}, BodySize: 10, TreeId: "91639b9835ff541f312fd2735f639a50bf35d472", }, "df914c609a1e16d7d68e4a61777ff5d6f6b6fde3": &gitalypb.GitCommit{ Id: "df914c609a1e16d7d68e4a61777ff5d6f6b6fde3", Subject: []byte("Commit #3"), Body: []byte("Commit #3\n"), Author: ahmadSherif(1500320258), Committer: ahmadSherif(1500320258), ParentIds: []string{"6762605237fc246ae146ac64ecb467f71d609120"}, BodySize: 10, TreeId: "91639b9835ff541f312fd2735f639a50bf35d472", }, "6762605237fc246ae146ac64ecb467f71d609120": &gitalypb.GitCommit{ Id: "6762605237fc246ae146ac64ecb467f71d609120", Subject: []byte("Commit #2"), Body: []byte("Commit #2\n"), Author: ahmadSherif(1500320256), Committer: ahmadSherif(1500320256), ParentIds: []string{"79b06233d3dc769921576771a4e8bee4b439595d"}, BodySize: 10, TreeId: "91639b9835ff541f312fd2735f639a50bf35d472", }, "79b06233d3dc769921576771a4e8bee4b439595d": &gitalypb.GitCommit{ Id: "79b06233d3dc769921576771a4e8bee4b439595d", Subject: []byte("Commit #1"), Body: []byte("Commit #1\n"), Author: ahmadSherif(1500320254), Committer: ahmadSherif(1500320254), ParentIds: []string{"1a0b36b3cdad1d2ee32457c102a8c0b7056fa863"}, BodySize: 10, TreeId: "91639b9835ff541f312fd2735f639a50bf35d472", }, "1a0b36b3cdad1d2ee32457c102a8c0b7056fa863": &gitalypb.GitCommit{ Id: "1a0b36b3cdad1d2ee32457c102a8c0b7056fa863", Subject: []byte("Initial commit"), Body: []byte("Initial commit\n"), Author: dmitriyZaporozhets(1393488198), Committer: dmitriyZaporozhets(1393488198), ParentIds: nil, BodySize: 15, TreeId: "91639b9835ff541f312fd2735f639a50bf35d472", }, "304d257dcb821665ab5110318fc58a007bd104ed": &gitalypb.GitCommit{ Id: "304d257dcb821665ab5110318fc58a007bd104ed", Subject: []byte("Commit #11"), Body: []byte("Commit #11\n"), Author: ahmadSherif(1500322381), Committer: ahmadSherif(1500322381), ParentIds: []string{"1a0b36b3cdad1d2ee32457c102a8c0b7056fa863"}, BodySize: 11, TreeId: "91639b9835ff541f312fd2735f639a50bf35d472", }, "1e292f8fedd741b75372e19097c76d327140c312": &gitalypb.GitCommit{ Id: "1e292f8fedd741b75372e19097c76d327140c312", Subject: []byte("Merge branch 'cherry-pikc-ce369011' into 'master'"), Body: []byte("Merge branch 'cherry-pikc-ce369011' into 'master'\n\nAdd file with a _flattable_ path\n\n See merge request gitlab-org/gitlab-test!35\n"), Author: drewBlessing(1540830087), Committer: drewBlessing(1540830087), ParentIds: []string{ "79b06233d3dc769921576771a4e8bee4b439595d", "c1c67abbaf91f624347bb3ae96eabe3a1b742478", }, BodySize: 388, TreeId: "07f8147e8e73aab6c935c296e8cdc5194dee729b", }, "60ecb67744cb56576c30214ff52294f8ce2def98": &gitalypb.GitCommit{ Id: "60ecb67744cb56576c30214ff52294f8ce2def98", Subject: []byte("Merge branch 'lfs' into 'master'"), Body: []byte("Merge branch 'lfs' into 'master'\n\nAdd LFS tracking of \"*.lfs\" to .gitattributes\n\nSee merge request gitlab-org/gitlab-test!28"), Author: stanHu(1515740810), Committer: stanHu(1515740810), ParentIds: []string{ "e63f41fe459e62e1228fcef60d7189127aeba95a", "55bc176024cfa3baaceb71db584c7e5df900ea65", }, BodySize: 124, TreeId: "7e2f26d033ee47cd0745649d1a28277c56197921", }, "e63f41fe459e62e1228fcef60d7189127aeba95a": &gitalypb.GitCommit{ Id: "e63f41fe459e62e1228fcef60d7189127aeba95a", Subject: []byte("Merge branch 'gitlab-test-usage-dev-testing-docs' into 'master'"), Body: []byte("Merge branch 'gitlab-test-usage-dev-testing-docs' into 'master'\r\n\r\nUpdate README.md to include `Usage in testing and development`\r\n\r\nSee merge request !21"), Author: seanMcGivern(1491906794), Committer: seanMcGivern(1491906794), ParentIds: []string{ "b83d6e391c22777fca1ed3012fce84f633d7fed0", "4a24d82dbca5c11c61556f3b35ca472b7463187e", }, BodySize: 154, TreeId: "86ec18bfe87ad42a782fdabd8310f9b7ac750f51", }, "55bc176024cfa3baaceb71db584c7e5df900ea65": &gitalypb.GitCommit{ Id: "55bc176024cfa3baaceb71db584c7e5df900ea65", Subject: []byte("LFS tracks \"*.lfs\" through .gitattributes"), Body: []byte("LFS tracks \"*.lfs\" through .gitattributes\n"), Author: jamesEdwardsJones(1515687321), Committer: jamesEdwardsJones(1515738427), ParentIds: []string{ "b83d6e391c22777fca1ed3012fce84f633d7fed0", }, BodySize: 42, TreeId: "1970c07e0e1ce7fcf82edc2e3792564bd8ea3744", }, "4a24d82dbca5c11c61556f3b35ca472b7463187e": &gitalypb.GitCommit{ Id: "4a24d82dbca5c11c61556f3b35ca472b7463187e", Subject: []byte("Update README.md to include `Usage in testing and development`"), Body: []byte("Update README.md to include `Usage in testing and development`"), Author: lukeBennett(1491905339), Committer: lukeBennett(1491905339), ParentIds: []string{ "b83d6e391c22777fca1ed3012fce84f633d7fed0", }, BodySize: 62, TreeId: "86ec18bfe87ad42a782fdabd8310f9b7ac750f51", }, "ce369011c189f62c815f5971d096b26759bab0d1": &gitalypb.GitCommit{ Id: "ce369011c189f62c815f5971d096b26759bab0d1", Subject: []byte("Add file with a _flattable_ path"), Body: []byte("Add file with a _flattable_ path\n"), Author: alejandroRodriguez(1504382739), Committer: alejandroRodriguez(1504397760), ParentIds: []string{ "913c66a37b4a45b9769037c55c2d238bd0942d2e", }, BodySize: 33, TreeId: "729bb692f55d49149609dd1ceaaf1febbdec7d0d", }, }
CommitsByID is a map of GitCommit structures by their respective IDs.
Functions ¶
func AddWorktree ¶
AddWorktree creates a worktree in the repository path for tests
func AddWorktreeArgs ¶
AddWorktreeArgs returns git command arguments for adding a worktree at the specified repo
func AuthorEqual ¶
func AuthorEqual(t testing.TB, expected *gitalypb.CommitAuthor, actual *gitalypb.CommitAuthor)
AuthorEqual tests if two `CommitAuthor`s are equal.
func CaptureHookEnv ¶
CaptureHookEnv creates a bogus 'update' Git hook to sniff out what environment variables get set for hooks.
func CloneBenchRepo ¶
func CloneBenchRepo(t testing.TB, cfg config.Cfg) (repo *gitalypb.Repository, repoPath string, cleanup func())
CloneBenchRepo creates a bare copy of the benchmarking test repository.
func CloneRepoAtStorage ¶
func CloneRepoAtStorage(t testing.TB, cfg config.Cfg, storage config.Storage, relativePath string) (*gitalypb.Repository, string, testhelper.Cleanup)
CloneRepoAtStorage clones a new copy of test repository under a subdirectory in the storage root.
func CloneRepoAtStorageRoot ¶
func CloneRepoAtStorageRoot(t testing.TB, cfg config.Cfg, storageRoot, relativePath string) *gitalypb.Repository
CloneRepoAtStorageRoot clones a new copy of test repository under a subdirectory in the storage root.
func CloneRepoWithWorktreeAtStorage ¶
func CloneRepoWithWorktreeAtStorage(t testing.TB, cfg config.Cfg, storage config.Storage) (*gitalypb.Repository, string, testhelper.Cleanup)
CloneRepoWithWorktreeAtStorage creates a copy of the test repository with a worktree at the storage you want. This is allows you to run normal 'non-bare' Git commands.
func CommitEqual ¶
CommitEqual tests if two `GitCommit`s are equal
func CreateCommitInAlternateObjectDirectory ¶
func CreateCommitInAlternateObjectDirectory(t testing.TB, gitBin, repoPath, altObjectsDir string, cmd *exec.Cmd) (currentHead []byte)
CreateCommitInAlternateObjectDirectory runs a command such that its created objects will live in an alternate objects directory. It returns the current head after the command is run and the alternate objects directory path
func CreateRemoteBranch ¶
CreateRemoteBranch creates a new remote branch
func CreateTag ¶
func CreateTag(t testing.TB, cfg config.Cfg, repoPath, tagName, targetID string, opts *CreateTagOpts) string
CreateTag creates a new tag.
func EnableGitProtocolV2Support ¶
EnableGitProtocolV2Support replaces the git binary in config with a wrapper that allows the protocol to be tested. It returns a function to read the GIT_PROTOCOl environment variable created by the wrapper script, the modified configuration as well as a cleanup function.
func ExecStream ¶
ExecStream runs a git command with an input stream and returns the standard output, or fails.
func GetGitObjectDirSize ¶
GetGitObjectDirSize gets the number of 1k blocks of a git object directory
func GetGitPackfileDirSize ¶
GetGitPackfileDirSize gets the number of 1k blocks of a git object directory
func GitObjectMustExist ¶
GitObjectMustExist is a test assertion that fails unless the git repo in repoPath contains sha
func GitObjectMustNotExist ¶
GitObjectMustNotExist is a test assertion that fails unless the git repo in repoPath contains sha
func GitServer ¶
func GitServer(t testing.TB, cfg config.Cfg, repoPath string, middleware func(http.ResponseWriter, *http.Request, http.Handler)) (int, func() error)
GitServer starts an HTTP server with git-http-backend(1) as CGI handler. The repository is prepared such that git-http-backend(1) will serve it by creating the "git-daemon-export-ok" magic file.
func InitBareRepoAt ¶
func InitBareRepoAt(t testing.TB, cfg config.Cfg, storage config.Storage) (*gitalypb.Repository, string, func())
InitBareRepoAt creates a new bare repository in the storage
func InitRepoDir ¶
func InitRepoDir(t testing.TB, storagePath, relativePath string) *gitalypb.Repository
InitRepoDir creates a temporary directory for a repo, without initializing it
func InitRepoWithWorktreeAtStorage ¶
func InitRepoWithWorktreeAtStorage(t testing.TB, cfg config.Cfg, storage config.Storage) (*gitalypb.Repository, string, func())
InitRepoWithWorktreeAtStorage creates a new repository with a worktree in the storage
func NewObjectPoolName ¶
NewObjectPoolName returns a random pool repository name in format '@pools/[0-9a-z]{2}/[0-9a-z]{2}/[0-9a-z]{64}.git'.
func NewRepositoryName ¶
NewRepositoryName returns a random repository hash in format '@hashed/[0-9a-f]{2}/[0-9a-f]{2}/[0-9a-f]{64}(.git)?'.
func RemoteExists ¶
RemoteExists tests if the repository at repoPath has a Git remote named remoteName.
func RemoteUploadPackServer ¶
func RemoteUploadPackServer(ctx context.Context, t *testing.T, gitPath, repoName, httpToken, repoPath string) (*httptest.Server, string)
RemoteUploadPackServer implements two HTTP routes for git-upload-pack by copying stdin and stdout into and out of the git upload-pack command
func RequireTree ¶
func RequireTree(t testing.TB, cfg config.Cfg, repoPath, treeish string, expectedEntries []TreeEntry)
RequireTree looks up the given treeish and asserts that its entries match the given expected entries. Tree entries are checked recursively.
func TestBitmapHasHashcache ¶
TestBitmapHasHashcache checks if the named pack bitmap file contains "hash cache" data. See https://github.com/git/git/blob/master/Documentation/technical/bitmap-format.txt
func TestDeltaIslands ¶
TestDeltaIslands is based on the tests in https://github.com/git/git/blob/master/t/t5320-delta-islands.sh .
func TestRepository ¶
func TestRepository(t *testing.T, cfg config.Cfg, getRepository func(testing.TB, *gitalypb.Repository) git.Repository)
TestRepository tests an implementation of Repository.
func WriteBlob ¶
WriteBlob writes the given contents as a blob into the repository and returns its OID.
func WriteBlobs ¶
WriteBlobs writes n distinct blobs into the git repository's object database. Each object has the current time in nanoseconds as contents.
func WriteCheckNewObjectExistsHook ¶
WriteCheckNewObjectExistsHook writes a pre-receive hook which only succeeds if it can find the object in the quarantine directory. if GIT_OBJECT_DIRECTORY and GIT_ALTERNATE_OBJECT_DIRECTORIES were not passed through correctly to the hooks, it will fail
func WriteCommit ¶
func WriteCommit(t testing.TB, cfg config.Cfg, repoPath string, opts ...WriteCommitOption) git.ObjectID
WriteCommit writes a new commit into the target repository.
func WriteCustomHook ¶
WriteCustomHook writes a hook in the repo/path.git/custom_hooks directory
func WriteEnvToCustomHook ¶
WriteEnvToCustomHook dumps the env vars that the custom hooks receives to a file
func WritePktlineDelim ¶
WritePktlineDelim writes the pktline-formatted delimiter into the writer.
func WritePktlineFlush ¶
WritePktlineFlush writes the pktline-formatted flush into the writer.
func WritePktlineString ¶
WritePktlineString writes the pktline-formatted data into the writer.
Types ¶
type CreateTagOpts ¶
CreateTagOpts holds extra options for CreateTag.
type TreeEntry ¶
type TreeEntry struct { // OID is the object ID the tree entry refers to. OID git.ObjectID // Mode is the file mode of the tree entry. Mode string // Path is the full path of the tree entry. Path string // Content is the content of the tree entry. Content string }
TreeEntry represents an entry of a git tree object.
type WriteCommitOption ¶
type WriteCommitOption func(*writeCommitConfig)
WriteCommitOption is an option which can be passed to WriteCommit.
func WithBranch ¶
func WithBranch(branch string) WriteCommitOption
WithBranch is an option for WriteCommit which will cause it to update the update the given branch name to the new commit.
func WithMessage ¶
func WithMessage(message string) WriteCommitOption
WithMessage is an option for WriteCommit which will set the commit message.
func WithParents ¶
func WithParents(parents ...git.ObjectID) WriteCommitOption
WithParents is an option for WriteCommit which will set the parent OIDs of the resulting commit.
func WithTreeEntries ¶
func WithTreeEntries(entries ...TreeEntry) WriteCommitOption
WithTreeEntries is an option for WriteCommit which will cause it to create a new tree and use it as root tree of the resulting commit.