Skip to content

Releases: gg-scm/gg-git

0.11.0

01 Aug 21:52
Compare
Choose a tag to compare

Version 0.11 adds an iteration API for refs.

Added

  • New methods Git.IterateRefs and Git.IterateRemoteRefs provide a streaming API for listing refs.

Deprecated

  • Git.ListRefs and Git.ListRefsVerbatim are deprecated in favor of Git.IterateRefs.
  • Git.ListRemoteRefs is deprecated in favor of Git.IterateRemoteRefs.

Fixed

  • Log no longer retains data after closing.
  • Fixed a panic in packfile/client.Remote.StartPush.

0.10.0

23 Feb 05:31
Compare
Choose a tag to compare

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, and CreateRef.
  • git.RefMutation has a new IsNoop method to make it easier to check for the zero value.
  • git.CommitOptions and git.AmendOptions have a new field: SkipHooks.
  • New method Git.DeleteBranches.
  • object.Commit has a new field Extra 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

18 Feb 20:33
Compare
Choose a tag to compare
0.10.0 beta 1 Pre-release
Pre-release

Added

  • There are several new git.RefMutation constructors: SetRef, SetRefIfMatches, and CreateRef.
  • git.RefMutation has a new IsNoop method to make it easier to check for the zero value.
  • git.CommitOptions and git.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

27 Jan 05:56
Compare
Choose a tag to compare

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 implement BinaryMarshaler and BinaryUnmarshaler in addition to TextMarshaler and TextUnmarshaler. This is for symmetry with object.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 the Ref type. This permits ref string manipulation without depending on the larger git package. git.Ref is now a type alias for githash.Ref.

Removed

  • Removed the packfile.ApplyDelta function. The packfile.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

02 Jan 21:08
Compare
Choose a tag to compare

Version 0.8.1 updates the README.

0.8.0

31 Dec 23:27
Compare
Choose a tag to compare

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.

0.7.3

13 Dec 22:19
Compare
Choose a tag to compare

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

04 Oct 20:57
Compare
Choose a tag to compare

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)

0.7.1

03 Oct 21:41
Compare
Choose a tag to compare

Version 0.7.1 fixed an issue with working copy renames on old versions of Git.

Fixed

  • Git versions before 2.18 have a bug where they will report renames even if --disable-renames is passed. *Git.Status will rewrite these to an add and a delete. (#3)

0.7.0

03 Oct 05:40
Compare
Choose a tag to compare

Version 0.7 made improvements to fetching commit information.

Added

  • The LogOptions.NoWalk field permits reading commits in bulk without having to process their ancestors. (#2)
  • The CommitInfo.Summary method returns the first line of a commit message.