Debian Codegraph @

/

debian golang-github-go-git-go-git-fixtures-v6 6.0.0~alpha.1-2debian golang-github-go-git-go-git-fixtures-v6-dev gomod github.com/go-git/go-git-fixtures/v6 debiangomakemakefilemarkdownshellyaml 26 files · 251 symbols
View dependency graph

Depends on

README (full)

go-git-fixtures GoDoc Test OpenSSF Scorecard

git repository fixtures used by go-git

Adding new Fixtures

Adding new pack fixtures

  1. Get the .idx, .rev and .pack files from the repository:
git clone https://<repository>
cd <repository_name>
git checkout <REF>
git gc

ls .git/objects/pack/
  1. Copy them into /data.
  2. Add a new entry in fixtures.go:
{
	Tags:         []string{"packfile", "<TAG_TO_REFER_TO>"},
	PackfileHash: "<PACK_HASH>",
}

Adding new dot fixtures

  1. 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 .
  1. Get the sha1/sha256 of the file: sha1sum < git.tgz.
  2. Move the file using the checksum to data/git-<checksum>.tgz
  3. Add a new entry in fixtures.go:
{
	Tags:         []string{".git", "<TAG_TO_REFER_TO>"},
	DotGitHash: "<GIT_TAR_HASH>",
}

Adding new worktree fixtures

  1. Tarball the contents of the cloned repository:
git clone https://<repository> <repository_name>

tar -czf worktree.tgz -C <repository_name> .
  1. Get the sha1/sha256 of the file: sha256sum < worktree.tgz.
  2. Move the file using the checksum to data/worktree-<checksum>.tgz
  3. Add a new entry in fixtures.go:
{
	Tags:         []string{"worktree", "<TAG_TO_REFER_TO>"},
	WorktreeHash: "<WORKTREE_TAR_HASH>",
}
dir .github/
dir data/
dir debian/
dir internal/
file .gitignore
file .golangci.yaml
file .renovaterc.json5
file LICENSE
file Makefile
file README.md
file entries.go
file entries_test.go
file fixtures.go
file fixtures_options.go
file fixtures_test.go
file go.mod
file go.sum
file osfixture.go
file osfixture_test.go
file scanner_entries.go