Releases: gg-scm/gg-git
0.12.0
Version 0.12 is mostly a bugfix release, but the changes in behavior to fix compatibility seemed large enough to warrant bumping the minor version.
Changed
- The
io/fs
package is used forFileMode
andFileInfo
instead ofos
. This should be a compatible change, since theos
types are aliases. *object.Commit.MarshalBinary
will use*time.Location
names if they are in the proper format. (#34)
Fixed
- Using
packfile/client
to read from an empty repository on old versions (~2.17) of Git no longer returns an error. *object.Commit.UnmarshalBinary
accepts timezones with less than 4 digits. (#34)object.Tree
now orders directories correctly. (Thanks to @yangchi for discovering this issue.)*Config.ListRemotes
matches behavior when running with Git 2.46+.
0.11.0
Version 0.11 adds an iteration API for refs.
Added
- New methods
Git.IterateRefs
andGit.IterateRemoteRefs
provide a streaming API for listing refs.
Deprecated
Git.ListRefs
andGit.ListRefsVerbatim
are deprecated in favor ofGit.IterateRefs
.Git.ListRemoteRefs
is deprecated in favor ofGit.IterateRemoteRefs
.
Fixed
Log
no longer retains data after closing.- Fixed a panic in
packfile/client.Remote.StartPush
.
0.10.0
Version 0.10 adds several features for mutating refs in a working copy and correctly handles extra fields in commit objects.
Added
- There are several new
git.RefMutation
constructors:SetRef
,SetRefIfMatches
, andCreateRef
. git.RefMutation
has a newIsNoop
method to make it easier to check for the zero value.git.CommitOptions
andgit.AmendOptions
have a new field:SkipHooks
.- New method
Git.DeleteBranches
. object.Commit
has a new fieldExtra
that stores any additional commit fields.
Changed
*client.PullStream.ListRefs
and*client.PushStream.Refs
now return a map of refs instead of a slice.
Fixed
object.ParseCommit
no longer rejects commits with extra fields. (#23)
0.10.0 beta 1
Added
- There are several new
git.RefMutation
constructors:SetRef
,SetRefIfMatches
, andCreateRef
. git.RefMutation
has a newIsNoop
method to make it easier to check for the zero value.git.CommitOptions
andgit.AmendOptions
have a new field:SkipHooks
.
Changed
*client.PullStream.ListRefs
and*client.PushStream.Refs
now return a map of refs instead of a slice.
0.9.0
Version 0.9 adds a new package for interacting with remote Git repositories and expands the packfile
package to handle random access.
Added
- A new
packfile/client
package enables downloading commits from and uploading commits to remote Git repositories. (#7) - The
packfile.DeltaReader
type is a flexible way of expanding a deltified object from a packfile. - The
packfile.Undeltifier
type decompresses objects from packfiles. - The
packfile.Index
type stores a packfile object ID lookup table that is nteroperable with Git packfile index files. (#12) packfile.ReadHeader
enables random access to a packfile.*object.Commit
and*object.Tag
now implementBinaryMarshaler
andBinaryUnmarshaler
in addition toTextMarshaler
andTextUnmarshaler
. This is for symmetry withobject.Tree
.object.Prefix
allows marshaling and unmarshaling the"blob 42\x00"
prefix used as part of the Git object hash.- The new
*Git.Clone
and*Git.CloneBare
methods clone repositories. git.URLFromPath
converts a filesystem path into a URL.
Changed
- The
githash
package is now the home for theRef
type. This permits ref string manipulation without depending on the largergit
package.git.Ref
is now a type alias forgithash.Ref
.
Removed
- Removed the
packfile.ApplyDelta
function. Thepackfile.DeltaReader
type performs the same function but permits more control over how it's used.
Fixed
Ref.IsValid
produces less false positives than before. (#16)
0.8.1
0.8.0
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
andAmendOptions.Committer
are now typeobject.User
instead ofgit.User
.*Git.Log
now callsgit rev-list | git cat-file
instead ofgit log
and parses the commits directly. One slight semantic change: ifHEAD
does not exist (an empty repository), then*Log.Close
returns an error.*TreeEntry.Mode
now sets bothos.ModeDir
andos.ModeSymlink
for submodules. This is more consistent with how Git treats these entries internally.*TreeEntry.ObjectType
now returns anobject.Type
instead of astring
. It is otherwise functionally identical.
Removed
git.CommitInfo
has been removed in favor ofobject.Commit
. The latter has mostly the same fields as the former, but does not contain aHash
field because the hash can be computed in Go.git.User
has been removed in favor ofobject.User
. The latter is a string rather than a struct so as to pass through user information from Git objects verbatim.
0.7.3
Version 0.7.3 releases minor fixes.
Changed
Git.Add
will no-op if passed no pathspecs.
Fixed
Git.DiffStatus
will no longer return an error on valid renames. (gg-scm/gg#129)
0.7.2
Version 0.7.2 removed the Windows color no-op.
Fixed
*Config.Color
and*Config.ColorBool
no longer no-op on Windows. (gg-scm/gg#125)