No description
- Go 96.9%
- Makefile 3.1%
|
|
||
|---|---|---|
| .github/workflows | ||
| data | ||
| debian | ||
| internal/tgz | ||
| .gitignore | ||
| .golangci.yaml | ||
| .renovaterc.json5 | ||
| entries.go | ||
| entries_test.go | ||
| fixtures.go | ||
| fixtures_options.go | ||
| fixtures_test.go | ||
| go.mod | ||
| go.sum | ||
| LICENSE | ||
| Makefile | ||
| osfixture.go | ||
| osfixture_test.go | ||
| README.md | ||
| scanner_entries.go | ||
go-git-fixtures

git repository fixtures used by go-git
Adding new Fixtures
Adding new pack fixtures
- Get the
.idx,.revand.packfiles from the repository:
git clone https://<repository>
cd <repository_name>
git checkout <REF>
git gc
ls .git/objects/pack/
- Copy them into
/data. - Add a new entry in
fixtures.go:
{
Tags: []string{"packfile", "<TAG_TO_REFER_TO>"},
PackfileHash: "<PACK_HASH>",
}
Adding new dot fixtures
- Tarball the contents of .git from a git repository:
git clone https://<repository>
cd <repository_name>
git checkout <REF>
git gc
tar -czf git.tgz -C .git .
- Get the sha1/sha256 of the file:
sha1sum < git.tgz. - Move the file using the checksum to
data/git-<checksum>.tgz - Add a new entry in
fixtures.go:
{
Tags: []string{".git", "<TAG_TO_REFER_TO>"},
DotGitHash: "<GIT_TAR_HASH>",
}
Adding new worktree fixtures
- Tarball the contents of the cloned repository:
git clone https://<repository> <repository_name>
tar -czf worktree.tgz -C <repository_name> .
- Get the sha1/sha256 of the file:
sha256sum < worktree.tgz. - Move the file using the checksum to
data/worktree-<checksum>.tgz - Add a new entry in
fixtures.go:
{
Tags: []string{"worktree", "<TAG_TO_REFER_TO>"},
WorktreeHash: "<WORKTREE_TAR_HASH>",
}