chore: bootstrap ermite-git module with license, readme and CI
- commit
- f886b9a5515611d4a7e50909355482f655db2226
- author
- brice · · 2026-10-09 16:42 UTC
- parent
- none (root commit)
- signature
- GPG Verified
CD88F9E564E0102646FB6077A1A07C7C7C3E349D· arch-gpg Verified for the committer email
7 files · +105 -0
A .forgejo/workflows/ci.yml +41 -0
| @@ -0,0 +1,41 @@ | |||
| 1 | + | name: CI | |
| 2 | + | ||
| 3 | + | on: | |
| 4 | + | push: | |
| 5 | + | branches: [main] | |
| 6 | + | pull_request: | |
| 7 | + | ||
| 8 | + | env: | |
| 9 | + | # Test the module alone, with the versions in go.mod (never a go.work). | |
| 10 | + | GOWORK: "off" | |
| 11 | + | GOPRIVATE: bnema.dev/ermite* | |
| 12 | + | ||
| 13 | + | jobs: | |
| 14 | + | lint: | |
| 15 | + | name: Lint | |
| 16 | + | runs-on: ubuntu-latest | |
| 17 | + | steps: | |
| 18 | + | - uses: actions/checkout@v6 | |
| 19 | + | - uses: actions/setup-go@v5 | |
| 20 | + | with: | |
| 21 | + | go-version-file: go.mod | |
| 22 | + | cache: true | |
| 23 | + | - uses: golangci/golangci-lint-action@v9 | |
| 24 | + | with: | |
| 25 | + | version: v2.14.0 | |
| 26 | + | ||
| 27 | + | test: | |
| 28 | + | name: Test | |
| 29 | + | runs-on: ubuntu-latest | |
| 30 | + | steps: | |
| 31 | + | - uses: actions/checkout@v6 | |
| 32 | + | - uses: actions/setup-go@v5 | |
| 33 | + | with: | |
| 34 | + | go-version-file: go.mod | |
| 35 | + | cache: true | |
| 36 | + | - name: Verify tidy | |
| 37 | + | run: | | |
| 38 | + | go mod tidy | |
| 39 | + | git diff --exit-code -- go.mod go.sum | |
| 40 | + | - run: go vet ./... | |
| 41 | + | - run: go test -race ./... | |
| @@ -0,0 +1,41 @@ | |||||
| 1 | + | name: CI | |||
| 2 | + | ||||
| 3 | + | on: | |||
| 4 | + | push: | |||
| 5 | + | branches: [main] | |||
| 6 | + | pull_request: | |||
| 7 | + | ||||
| 8 | + | env: | |||
| 9 | + | # Test the module alone, with the versions in go.mod (never a go.work). | |||
| 10 | + | GOWORK: "off" | |||
| 11 | + | GOPRIVATE: bnema.dev/ermite* | |||
| 12 | + | ||||
| 13 | + | jobs: | |||
| 14 | + | lint: | |||
| 15 | + | name: Lint | |||
| 16 | + | runs-on: ubuntu-latest | |||
| 17 | + | steps: | |||
| 18 | + | - uses: actions/checkout@v6 | |||
| 19 | + | - uses: actions/setup-go@v5 | |||
| 20 | + | with: | |||
| 21 | + | go-version-file: go.mod | |||
| 22 | + | cache: true | |||
| 23 | + | - uses: golangci/golangci-lint-action@v9 | |||
| 24 | + | with: | |||
| 25 | + | version: v2.14.0 | |||
| 26 | + | ||||
| 27 | + | test: | |||
| 28 | + | name: Test | |||
| 29 | + | runs-on: ubuntu-latest | |||
| 30 | + | steps: | |||
| 31 | + | - uses: actions/checkout@v6 | |||
| 32 | + | - uses: actions/setup-go@v5 | |||
| 33 | + | with: | |||
| 34 | + | go-version-file: go.mod | |||
| 35 | + | cache: true | |||
| 36 | + | - name: Verify tidy | |||
| 37 | + | run: | | |||
| 38 | + | go mod tidy | |||
| 39 | + | git diff --exit-code -- go.mod go.sum | |||
| 40 | + | - run: go vet ./... | |||
| 41 | + | - run: go test -race ./... | |||
A .gitignore +1 -0
| @@ -0,0 +1,1 @@ | |||
| 1 | + | /tmp/ | |
| @@ -0,0 +1,1 @@ | |||||
| 1 | + | /tmp/ | |||
A .golangci.yml +13 -0
| @@ -0,0 +1,13 @@ | |||
| 1 | + | version: "2" | |
| 2 | + | ||
| 3 | + | linters: | |
| 4 | + | enable: | |
| 5 | + | - errcheck | |
| 6 | + | - govet | |
| 7 | + | - ineffassign | |
| 8 | + | - misspell | |
| 9 | + | - staticcheck | |
| 10 | + | - unconvert | |
| 11 | + | - unused | |
| 12 | + | exclusions: | |
| 13 | + | generated: strict | |
| @@ -0,0 +1,13 @@ | |||||
| 1 | + | version: "2" | |||
| 2 | + | ||||
| 3 | + | linters: | |||
| 4 | + | enable: | |||
| 5 | + | - errcheck | |||
| 6 | + | - govet | |||
| 7 | + | - ineffassign | |||
| 8 | + | - misspell | |||
| 9 | + | - staticcheck | |||
| 10 | + | - unconvert | |||
| 11 | + | - unused | |||
| 12 | + | exclusions: | |||
| 13 | + | generated: strict | |||
A LICENSE +21 -0
| @@ -0,0 +1,21 @@ | |||
| 1 | + | MIT License | |
| 2 | + | ||
| 3 | + | Copyright (c) 2026 bnema | |
| 4 | + | ||
| 5 | + | Permission is hereby granted, free of charge, to any person obtaining a copy | |
| 6 | + | of this software and associated documentation files (the "Software"), to deal | |
| 7 | + | in the Software without restriction, including without limitation the rights | |
| 8 | + | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | |
| 9 | + | copies of the Software, and to permit persons to whom the Software is | |
| 10 | + | furnished to do so, subject to the following conditions: | |
| 11 | + | ||
| 12 | + | The above copyright notice and this permission notice shall be included in all | |
| 13 | + | copies or substantial portions of the Software. | |
| 14 | + | ||
| 15 | + | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | |
| 16 | + | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | |
| 17 | + | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE | |
| 18 | + | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | |
| 19 | + | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, | |
| 20 | + | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE | |
| 21 | + | SOFTWARE. | |
| @@ -0,0 +1,21 @@ | |||||
| 1 | + | MIT License | |||
| 2 | + | ||||
| 3 | + | Copyright (c) 2026 bnema | |||
| 4 | + | ||||
| 5 | + | Permission is hereby granted, free of charge, to any person obtaining a copy | |||
| 6 | + | of this software and associated documentation files (the "Software"), to deal | |||
| 7 | + | in the Software without restriction, including without limitation the rights | |||
| 8 | + | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | |||
| 9 | + | copies of the Software, and to permit persons to whom the Software is | |||
| 10 | + | furnished to do so, subject to the following conditions: | |||
| 11 | + | ||||
| 12 | + | The above copyright notice and this permission notice shall be included in all | |||
| 13 | + | copies or substantial portions of the Software. | |||
| 14 | + | ||||
| 15 | + | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | |||
| 16 | + | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | |||
| 17 | + | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE | |||
| 18 | + | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | |||
| 19 | + | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, | |||
| 20 | + | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE | |||
| 21 | + | SOFTWARE. | |||
A README.md +19 -0
| @@ -0,0 +1,19 @@ | |||
| 1 | + | # ermite-git | |
| 2 | + | ||
| 3 | + | A fast, read-only Git repository reader for Go: refs, objects, packfiles, trees and history, using commit-graph and changed-path Bloom filters. Standard library only. | |
| 4 | + | ||
| 5 | + | Status: early development, no stable API. | |
| 6 | + | ||
| 7 | + | ```go | |
| 8 | + | import git "bnema.dev/ermite-git" | |
| 9 | + | ``` | |
| 10 | + | ||
| 11 | + | ## Test | |
| 12 | + | ||
| 13 | + | ```sh | |
| 14 | + | go test ./... | |
| 15 | + | ``` | |
| 16 | + | ||
| 17 | + | ## License | |
| 18 | + | ||
| 19 | + | MIT. See [LICENSE](LICENSE). | |
| @@ -0,0 +1,19 @@ | |||||
| 1 | + | # ermite-git | |||
| 2 | + | ||||
| 3 | + | A fast, read-only Git repository reader for Go: refs, objects, packfiles, trees and history, using commit-graph and changed-path Bloom filters. Standard library only. | |||
| 4 | + | ||||
| 5 | + | Status: early development, no stable API. | |||
| 6 | + | ||||
| 7 | + | ```go | |||
| 8 | + | import git "bnema.dev/ermite-git" | |||
| 9 | + | ``` | |||
| 10 | + | ||||
| 11 | + | ## Test | |||
| 12 | + | ||||
| 13 | + | ```sh | |||
| 14 | + | go test ./... | |||
| 15 | + | ``` | |||
| 16 | + | ||||
| 17 | + | ## License | |||
| 18 | + | ||||
| 19 | + | MIT. See [LICENSE](LICENSE). | |||
A doc.go +7 -0
| @@ -0,0 +1,7 @@ | |||
| 1 | + | // SPDX-License-Identifier: MIT | |
| 2 | + | ||
| 3 | + | // Package git reads Git repositories without the git binary: refs, loose | |
| 4 | + | // and packed objects, trees, blobs and commit history. It uses the | |
| 5 | + | // commit-graph and changed-path Bloom filters when present. It never | |
| 6 | + | // writes to a repository. | |
| 7 | + | package git | |
| @@ -0,0 +1,7 @@ | |||||
| 1 | + | // SPDX-License-Identifier: MIT | |||
| 2 | + | ||||
| 3 | + | // Package git reads Git repositories without the git binary: refs, loose | |||
| 4 | + | // and packed objects, trees, blobs and commit history. It uses the | |||
| 5 | + | // commit-graph and changed-path Bloom filters when present. It never | |||
| 6 | + | // writes to a repository. | |||
| 7 | + | package git | |||
A go.mod +3 -0
| @@ -0,0 +1,3 @@ | |||
| 1 | + | module bnema.dev/ermite-git | |
| 2 | + | ||
| 3 | + | go 1.27.1 | |
| @@ -0,0 +1,3 @@ | |||||
| 1 | + | module bnema.dev/ermite-git | |||
| 2 | + | ||||
| 3 | + | go 1.27.1 | |||