Version 0.8 adds two new packages: object and packfile. These are pure Go implementations of the Git data structures and wire protocol, respectively. While most users will not interact with these packages directly, this provides better correctness guarantees, and makes it easier to directly read or write objects to a Git repository. Users that inspect commits with the git package now receive a higher fidelity data structure than before.
Added
A new object package enables serializing and deserializing Git objects.
A new packfile package enables reading and writing the Git packfile format. (#4)
Changed
*Git.CommitInfo and *Log.CommitInfo now return an *object.Commit instead of a *git.CommitInfo.
CommitOptions.Author, CommitOptions.Committer, AmendOptions.Author and AmendOptions.Committer are now type object.User instead of git.User.
*Git.Log now calls git rev-list | git cat-file instead of git log and parses the commits directly. One slight semantic change: if HEAD does not exist (an empty repository), then *Log.Close returns an error.
*TreeEntry.Mode now sets both os.ModeDir and os.ModeSymlink for submodules. This is more consistent with how Git treats these entries internally.
*TreeEntry.ObjectType now returns an object.Type instead of a string. It is otherwise functionally identical.
Removed
git.CommitInfo has been removed in favor of object.Commit. The latter has mostly the same fields as the former, but does not contain a Hash field because the hash can be computed in Go.
git.User has been removed in favor of object.User. The latter is a string rather than a struct so as to pass through user information from Git objects verbatim.
Version 0.8 adds two new packages: object and packfile. These are pure Go
implementations of the Git data structures and wire protocol, respectively.
While most users will not interact with these packages directly, this provides
better correctness guarantees, and makes it easier to directly read or write
objects to a Git repository. Users that inspect commits with the git package
now receive a higher fidelity data structure than before.
Added
A new object package enables serializing and deserializing Git objects.
A new packfile package enables reading and writing the Git packfile format.
(#4)
Changed
*Git.CommitInfo and *Log.CommitInfo now return an *object.Commit
instead of a *git.CommitInfo.
CommitOptions.Author, CommitOptions.Committer, AmendOptions.Author and
AmendOptions.Committer are now type object.User instead of git.User.
*Git.Log now calls git rev-list | git cat-file instead of git log and
parses the commits directly. One slight semantic change: if HEAD does not
exist (an empty repository), then *Log.Close returns an error.
*TreeEntry.Mode now sets both os.ModeDir and os.ModeSymlink for
submodules. This is more consistent with how Git treats these entries
internally.
*TreeEntry.ObjectType now returns an object.Type instead of a string.
It is otherwise functionally identical.
Removed
git.CommitInfo has been removed in favor of object.Commit. The latter has
mostly the same fields as the former, but does not contain a Hash field
because the hash can be computed in Go.
git.User has been removed in favor of object.User. The latter is a string
rather than a struct so as to pass through user information from Git objects
verbatim.
Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.
Dependabot commands and options
You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it
- `@dependabot merge` will merge this PR after your CI passes on it
- `@dependabot squash and merge` will squash and merge this PR after your CI passes on it
- `@dependabot cancel merge` will cancel a previously requested merge and block automerging
- `@dependabot reopen` will reopen this PR if it is closed
- `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
- `@dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
- `@dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
- `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
Bumps gg-scm.io/pkg/git from 0.7.3 to 0.8.1.
Release notes
Sourced from gg-scm.io/pkg/git's releases.
Changelog
Sourced from gg-scm.io/pkg/git's changelog.
Commits
c8ede91
README: add more details291c87c
CHANGELOG: add 0.8.0 release notesb57b528
Add test case for log on empty repository600e6a5
Add object.Tag type95f2d9e
Add checks for NUL/newline in commit serialization15c9f17
Add object.Type enuma05ff7f
.github/workflows: run tests with race detector8f668fb
Upgrade go-cmp dependency4652cb4
Fix Log on commit messages without trailing newlines4e19032
Add object.MakeUser functionDependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting
@dependabot rebase
.Dependabot commands and options
You can trigger Dependabot actions by commenting on this PR: - `@dependabot rebase` will rebase this PR - `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it - `@dependabot merge` will merge this PR after your CI passes on it - `@dependabot squash and merge` will squash and merge this PR after your CI passes on it - `@dependabot cancel merge` will cancel a previously requested merge and block automerging - `@dependabot reopen` will reopen this PR if it is closed - `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually - `@dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)