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/fspackage is used forFileModeandFileInfoinstead ofos. This should be a compatible change, since theostypes are aliases. *object.Commit.MarshalBinarywill use*time.Locationnames if they are in the proper format. (#34)
Fixed
- Using
packfile/clientto read from an empty repository on old versions (~2.17) of Git no longer returns an error. *object.Commit.UnmarshalBinaryaccepts timezones with less than 4 digits. (#34)object.Treenow orders directories correctly. (Thanks to @yangchi for discovering this issue.)*Config.ListRemotesmatches behavior when running with Git 2.46+.
0.11.0
Version 0.11 adds an iteration API for refs.
Added
- New methods
Git.IterateRefsandGit.IterateRemoteRefsprovide a streaming API for listing refs.
Deprecated
Git.ListRefsandGit.ListRefsVerbatimare deprecated in favor ofGit.IterateRefs.Git.ListRemoteRefsis deprecated in favor ofGit.IterateRemoteRefs.
Fixed
Logno 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.RefMutationconstructors:SetRef,SetRefIfMatches, andCreateRef. git.RefMutationhas a newIsNoopmethod to make it easier to check for the zero value.git.CommitOptionsandgit.AmendOptionshave a new field:SkipHooks.- New method
Git.DeleteBranches. object.Commithas a new fieldExtrathat stores any additional commit fields.
Changed
*client.PullStream.ListRefsand*client.PushStream.Refsnow return a map of refs instead of a slice.
Fixed
object.ParseCommitno longer rejects commits with extra fields. (#23)
0.10.0 beta 1
Added
- There are several new
git.RefMutationconstructors:SetRef,SetRefIfMatches, andCreateRef. git.RefMutationhas a newIsNoopmethod to make it easier to check for the zero value.git.CommitOptionsandgit.AmendOptionshave a new field:SkipHooks.
Changed
*client.PullStream.ListRefsand*client.PushStream.Refsnow 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/clientpackage enables downloading commits from and uploading commits to remote Git repositories. (#7) - The
packfile.DeltaReadertype is a flexible way of expanding a deltified object from a packfile. - The
packfile.Undeltifiertype decompresses objects from packfiles. - The
packfile.Indextype stores a packfile object ID lookup table that is nteroperable with Git packfile index files. (#12) packfile.ReadHeaderenables random access to a packfile.*object.Commitand*object.Tagnow implementBinaryMarshalerandBinaryUnmarshalerin addition toTextMarshalerandTextUnmarshaler. This is for symmetry withobject.Tree.object.Prefixallows marshaling and unmarshaling the"blob 42\x00"prefix used as part of the Git object hash.- The new
*Git.Cloneand*Git.CloneBaremethods clone repositories. git.URLFromPathconverts a filesystem path into a URL.
Changed
- The
githashpackage is now the home for theReftype. This permits ref string manipulation without depending on the largergitpackage.git.Refis now a type alias forgithash.Ref.
Removed
- Removed the
packfile.ApplyDeltafunction. Thepackfile.DeltaReadertype performs the same function but permits more control over how it's used.
Fixed
Ref.IsValidproduces 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
objectpackage enables serializing and deserializing Git objects. - A new
packfilepackage enables reading and writing the Git packfile format. (#4)
Changed
*Git.CommitInfoand*Log.CommitInfonow return an*object.Commitinstead of a*git.CommitInfo.CommitOptions.Author,CommitOptions.Committer,AmendOptions.AuthorandAmendOptions.Committerare now typeobject.Userinstead ofgit.User.*Git.Lognow callsgit rev-list | git cat-fileinstead ofgit logand parses the commits directly. One slight semantic change: ifHEADdoes not exist (an empty repository), then*Log.Closereturns an error.*TreeEntry.Modenow sets bothos.ModeDirandos.ModeSymlinkfor submodules. This is more consistent with how Git treats these entries internally.*TreeEntry.ObjectTypenow returns anobject.Typeinstead of astring. It is otherwise functionally identical.
Removed
git.CommitInfohas been removed in favor ofobject.Commit. The latter has mostly the same fields as the former, but does not contain aHashfield because the hash can be computed in Go.git.Userhas 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.Addwill no-op if passed no pathspecs.
Fixed
Git.DiffStatuswill 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.Colorand*Config.ColorBoolno longer no-op on Windows. (gg-scm/gg#125)