vcsaccess
Interface for Version Control System access using Go

Summary
vcsaccess defines an interface for read access to a version control system repository,
plus an implementation for this interface that wraps the git command for repositories
on disk.
Note that the interface only defines a rather minimal subset of a typical VCSs capabilities.
This is an intentional simplification; this library does not claim completeness.
This library is implemented in the Go programming language.
It uses the golangci-lint and REUSE linters for basic quality control.
vcsaccess is brought to you by boneffect software solutions.
Usage
vcsaccess can be installed using:
go get open.boneffect.de/libs/vcsaccess
The following example loads a Git repository from disk and prints its commit history:
repo, err := vcsaccess.OpenGitRepository(ctx, path)
handleError(err)
commitInfos, err := repo.CommitHistory(ctx, "HEAD", nil, nil)
handleError(err)
for _, commitInfo := range commitInfos {
fmt.Printf("%s %s %s\n", commitInfo.Hash, commitInfo.AuthorTimestamp.Format(time.RFC3339), commitInfo.Message)
}
You can find the full source code at examples/show-history/main.go.
vcsaccess is documented using doc comments that can be rendered in the documentation
viewer or IDE of your choice. It is recommended to read the file interface.go.
Contributing
vcsaccess is developed on the collaborative development platform Codeberg, at
https://codeberg.org/boneffect/vcsaccess. If you have a Codeberg account, you can
contribute to the project by posting issues or pull requests there.
If you don't have or don't want a Codeberg account, you can alternatively contribute via
email - see the Contact section below.
When contributing code or patches, make sure that you keep the code clean and simple,
aim for high test coverage and make sure that you add your name to the copyright headers.
When using third-party code, you must include all necessary attribution notices. Do not
contribute code that is under an incompatible license. Keep third-party code to a minimum
and prefer to import third-party code using Go Modules, unless that pulls in unnecessary
transitive dependencies.
Note that the repository at Codeberg is directed at contributors only.
Please do not send support inquiries to the issue tracker, see the Contact section
below instead.
Releases of vcsaccess are published at https://open.boneffect.de/libs/vcsaccess.
Copyright and Licensing
vcsaccess is (C) 2023 boneffect software solutions Lucas Hinderberger
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
Be aware that vcsaccess depends on third-party code (which in turn might include further
dependencies) that may be under a different license.
For details, please refer to the LICENSE file.
Contact
You can contact the maintainer via the abovementioned issue tracker or, if you prefer,
via email at info@boneffect.de.
Further contact information is published at: https://www.boneffect.de/impressum
The privacy policy of boneffect software solutions is published at: https://www.boneffect.de/datenschutz