@mcuadros mcuadros released this Jan 8, 2018 · 286 commits to master since this release

Assets 2

go-git logo
GoDoc Build Status Build status codecov.io Go Report Card

go-git is a highly extensible git implementation library written in pure Go.

After almost 18 months of development, more than +700 commits, and 15 release candidates we are pleased to release the v4 covering almost all the commonly used git functionalities.

The project license has changed to Apache License Version 2.0 and Developer Certificate of Origin. Also now provide Contributing Guidelines in order to make easier contribute to the project.

Stable API

The API is considered stable in all the functions reachable from the main package. This means that the plumbing structs and functions from plumbing package that are being used as arguments or returned by functions in the main package are stable too. Plumbing structures used under the hood may change in following releases but in ways that won't break compatibility.

Changes

Fixed bugs:

  • panic in object.getFileStatsFromFilePatches() for commits updating submodules: both from and to are nil #654
  • RemoveReference doesn't always work #648
  • Checking out over https fails #623
  • git commit -a should not refer to the storage but to the filesystem #571
  • SIGSEGV in fillREFDeltaObjectContent #568
  • Rare SIGSEGV in fillREFDeltaObjectContent #682
  • repo.Reference(plumbing.ReferenceName("refs/remotes/origin/branch"), true) results in "reference not found" error #676
  • Commit Modified Lines #622
  • PlainClone not fully populating tree on Windows #389

Merged pull requests:

  • License upgrade, plus code of conduct and contributing guidelines #680 (mcuadros)
  • Worktree.Grep() support multiple patterns and pathspecs #695 (darkowlzz)
  • Worktree, add Grep() method for git grep #686 (darkowlzz)
  • Worktree, add Clean() method for git clean #675 (darkowlzz)
  • storage: filesystem, add support for git alternates #663 (darkowlzz)
  • storage: add new functions for garbage collection #669 (strib)
  • fix Repository.ResolveRevision for branch and tag #660 (antham)
  • *: update to go-billy.v4 and go-git-fixtures.v3 #655 (mcuadros)
  • storage: dotgit, handle refs that exist in both packed-refs and a loose ref file #666 (strib)
  • storage: dotgit, remove ref cache for packed refs #651 (erizocosmico)
  • utils: merkletrie, filesystem fix symlinks to dir #640 (dimonomid)
  • config: support a configurable, and turn-off-able, pack.window #587 (strib)
  • Remote, fix a range loop can break in advance #641 (sunfishgao)
  • Remote, support for non-force, fast-forward-only fetches #665 (strib)
  • Remote, add the last 100 commits for each ref in haves list #610 (strib)
  • Remote, add support for ls-remote #609 (darkowlzz)
  • Remote, iterate over references only once #580 (erizocosmico)
  • Worktree.Add, Support Add deleted files, fixes #571 #577 (grunenwflorian)
  • plumbing: cache, enforce the use of cache in packfile decoder #698 (jfontan)
  • plumbing: packp/capability, skip argument validations for unknown capabilities #626 (orirawlings)
  • plumbing: packfile, fix DecodeObjectAt when Decoder has type #646 (mcuadros)
  • plumbing: packfile, delete index maps from memory when no longer needed #632 (strib)
  • plumbing: packfile, use buffer pool for diffs #631 (strib)
  • plumbing: packfile, improve delta reutilization #697 (ajnavarro)
  • plumbing: object, add Stats() to Commit #613 (darkowlzz)
  • plumbing: object, add support for signed commits #616 (darkowlzz)
  • plumbing: object/tag, add signature and verification support #658 (darkowlzz)
  • plumbing: object, new Commit.Verify method #653 (darkowlzz)
  • plumbing: object, do not eat error on tree decode #652 (ferhatelmas)
  • plumbing: object: patch, fix stats for submodules (fixes #654) #677 (krylovsk)
  • plumbing: transport, add port to SCP Endpoints #608 (balkian)
  • plumbing: transport/http, Close http.Body reader when needed #657 (ajnavarro)
  • plumbing: transport/ssh, check .ssh/config for host and port overrides; fixes #629 #687 (smithrobs)
  • plumbing: transport, converts Endpoint interface into a struct #650 (mcuadros)
  • plumbing: transport, made public all the fields and standardized AuthMethod #649 (mcuadros)
  • plumbing: revlist, do not revisit ancestors as long as all branches are visited #588 (erizocosmico)
  • plumbing: the commit walker can skip externally-seen commits #586 (strib)
  • plumbing: packfile, improve performance of delta generation #582 (erizocosmico)
  • plumbing: object, commit.Parent() method #534 (josharian)