Skip to content
This repository has been archived by the owner on Sep 11, 2020. It is now read-only.

Releases: src-d/go-git

v4.1.0

16 Jan 13:42
e9247ce
Compare
Choose a tag to compare

Here is a new release of go-git, it's focused on a performance improvement at clone operation with medium to big repositories (bigger than 200mb).

The clone operation it's now 2x times faster and uses 3x-5x times less memory.

Changes

Fixed bugs:

  • config: set default pack window size in config #712 (jfontan)

Merged pull requests:

  • plumbing: cache, modify cache to delete more than one item to free space #720 (jfontan)
  • plumbing: packfile, clean reconstructed objects outside pack window #716 (jfontan)
  • examples: add branch add/remove example #714 (marwan-at-work)

v4.0.0

08 Jan 13:07
bf3b1f1
Compare
Choose a tag to compare

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)

v4.0.0-rc15

04 Sep 17:54
Compare
Choose a tag to compare

Fixed bugs:

  • Worktree.Clone can't checkout commit pointed to by tag, but Git works #574
  • Worktree.Checkout:Force bug? #435
  • Worktree Checkout and Reset call to fetch operations on submodules #415

Merged pull requests:

  • packfile: improve performance a little by reducing gc pressure #578 (erizocosmico)
  • Repository.Clone added Tags option, and set by default AllTags #576 (mcuadros)
  • Add sideband support for push #573 (orirawlings)
  • Worktree.Reset refactor and Soft, Merge, Hard and Mixed modes #572 (mcuadros)
  • dotgit: avoid duplicated references returned by Refs #569 (erizocosmico)

v4.0.0-rc14

28 Aug 19:17
Compare
Choose a tag to compare

Implemented enhancements:

  • Support cancellation of long-running repository operations (with context.Context) #483

Fixed bugs:

  • Can't clone annotated tags with ReferenceName in Clone #557
  • PlainClone w/ tag returning reference not found #529
  • Character normalization bug #495
  • plumbing.Reference.IsBranch is not working well on windows #462
  • windows support #345
  • packp: AdvRefs is not encoded correctly when missing Head pointer #152
  • user.Current() causes error when cross compiled #537
  • Unable to push when there are a lot of merged merge requests history in ref #530
  • Panic when calling Patch.String #523
  • CloneOptions should reuse Auth method when recursing submodules #521

Merged pull requests:

  • remote: avoid expensive revlist operation when only deleting refs #567 (strib)
  • plumbing: use sliding window in delta calculations, like git CL #565 (strib)
  • plumbing: use seen map in tree walker #564 (strib)
  • dotgit: rewrite the way references are looked up #563 (erizocosmico)
  • grammar correction #561 (zachgersh)
  • repository: Resolve commit when cloning annotated tag, fixes #557 #558 (orirawlings)
  • _examples: context #555 (mcuadros)
  • plumbing: use LookPath instead of Stat to fix Windows executables #554 (strib)
  • packp: fixed encoding when HEAD is not a valid ref #552 (mcarmonaa)
  • examples: add example for pulling changes #546 (orirawlings)
  • fix race condition on ObjectLRU #544 (erizocosmico)
  • prevent PackWriter from using Notify if nothing was written #543 (erizocosmico)
  • serialized remotes in alphabetical order #542 (mcarmonaa)
  • *: windows support, skipped receive_pack_test for git transport #540 (mcarmonaa)
  • Avoid using user.Current() #538 (kimh)
  • *: windows support, some more fixes (2) #536 (mcarmonaa)
  • *: windows support, some more fixes #533 (mcarmonaa)
  • Remote.Clone fix clone of tags in shallow mode #532 (mcuadros)
  • plumbing: moved Reference.Is\* methods to ReferenceName.Is\* #531 (mcuadros)
  • plumbing: fix pack commands for the file client on Windows #527 (strib)
  • Normalize filenames before comparing. #526 (joshbetz)
  • reuse Auth method when recursing submodules, fixes #521 #522 (devonbarrett)
  • config: multiple values in RemoteConfig (URLs and Fetch) #501 (smola)

v4.0.0-rc13

28 Jul 20:04
Compare
Choose a tag to compare
v4.0.0-rc13 Pre-release
Pre-release

Implemented enhancements:

  • Adding SSH ciphers when connecting #393
  • Walking through tree of non gitignored files #307

Fixed bugs:

  • No way to specify Auth for SubmoduleUpdateOptions #520
  • panic when using custom SSH client #519
  • Pack files >2GB create corrupted indexes #502
  • Different behavior on Fetch and Pull #470
  • git push new branch with depth=1 #455
  • Upon repo.Push standard git still sees commits as unpushed #443
  • Fetch remote tags to local #371
  • Very slow for large repos #505

Merged pull requests:

  • filesystem: reuse cache for packfile iterator #517 (smola)
  • revlist: ignore all objects reachable from ignored objects #516 (smola)
  • storage: reuse deltas from packfiles #515 (smola)
  • cache: reuse object cache for delta resolution, use LRU policy #514 (smola)
  • worktree: expose underlying filesystem #513 (mcuadros)
  • format: idxfile, support for >2Gb packfiles #512 (mcuadros)
  • remote: pull refactor to match default behavior of cgit #511 (mcuadros)
  • packfile: create packfile.Index and reuse it #510 (smola)
  • *: package context support in Repository, Remote and Submodule #509 (mcuadros)
  • transport: context package support allowing cancellation of any network operation #507 (mcuadros)
  • Add AuthMethod based on HTTP Authorization header #504 (strin)
  • move Repository.Pull to Worktree.Pull #499 (mcuadros)
  • remote: push, update remote refs on push #498 (mcuadros)
  • Implement a NoTags mode for fetch that mimics git fetch --no-tags #496 (lupine)
  • *: several windows support fixes #493 (mcuadros)
  • packfile: Avoid panics patching corrupted deltas. #492 (ajnavarro)
  • *: add more IO error checks #491 (smola)
  • repository: allow push from shallow repositories #489 (mcuadros)
  • worktree: checkout, create branch #487 (mcuadros)
  • Add example code for listing tags #484 (orirawlings)

v4.0.0-rc12

17 Jul 08:01
Compare
Choose a tag to compare
v4.0.0-rc12 Pre-release
Pre-release

Implemented enhancements:

  • transport: push with HTTPS : receive-pack not supported yet #406

Fixed bugs:

  • Push: RefSpec deleting reference does not work #466
  • data races in plumbing/transport/internal/common #463
  • Git status silently fails in a repository with no commits. #459
  • capabilities parsing fails when non-standard capability is found (was: Cloning from github broken?) #450
  • Chroot boundary crossed error when cloning symlinks pointing outside the repo #445
  • submodules path in gitdir is wrong (was: Submodules not having any objects) #413
  • References() returns forward slashes on Windows #372
  • Fetch remote tags to local #371
  • Race detected during PlainClone #351
  • Reference IsTag() is broken #461

Improvements

  • remote: fix Worktree.Status on empty repository #480 (mcuadros)
  • remote: avoid duplicate haves #479 (mcuadros)
  • worktree: test improvemnts on empty worktree #478 (mcuadros)
  • git: remove ErrObjectNotFound in favor of plumbing.ErrObjectNotFound #477 (taralx)
  • transport/server: add asClient parameter #476 (smola)
  • plumbing: protocol, fix handling multiple ACK on upload-pack and test… #475 (mcuadros)
  • Use buffered IO for decoding index files. #473 (taralx)
  • improve delete support on push #472 (smola)
  • plumbing: protocol, fix handling multiple ACK on upload-pack #469 (mcuadros)
  • remote: fix push delete, closes #466 #467 (smola)
  • fix reference shortening #465 (smola)
  • transport/file: avoid race with Command.Wait, fixes #463 #464 (smola)
  • fix race on packfile writer, fixes #351 #453 (smola)
  • storage/filesystem: Fix nil dereference in Shallow() #452 (taralx)
  • capability: accept unknown capabilities, fixes #450 #451 (smola)
  • transport: http push #432 (ajnavarro)
  • transport/ssh: allow passing SSH options #423 (smola)
  • Fixed modules directory path #414 (Cromel)
  • remote: fetch, correct behavior on tags #485 (mcuadros)

v4.0.0-rc11

22 Jun 22:17
Compare
Choose a tag to compare
v4.0.0-rc11 Pre-release
Pre-release

Highlights

  • worktree: adds .gitignore support (#429) (#444)
  • worktree: symlink support (#436)
  • *: upgrade to go-billy.v3

Bug fixes

  • client: ssh, fix push on git and ssh (#418)
  • revlist: ignore treeEntries that are submodules. (#440)
  • repository: update local remote references during fetch even if no pack needs to be received (#434)
  • worktree: Add create and push the blob objects to the storer (#441)
  • storage/filesystem: call initialization explicitly, fixes (#408) (#409)

Improvements:

  • internal/dotgit: rewrite code to avoid stackoverflow errors (#442)
  • client: ssh, support SSH Agent Auth on Windows (#405)
  • partial windows support (#369)
  • packfile: copy operation limited to 64kb (#411)
  • object: fix naming of NewCommit{Pre,Post}Iterator (#421)

v4.0.0-rc10

24 May 10:12
Compare
Choose a tag to compare
v4.0.0-rc10 Pre-release
Pre-release

Highlights

v4.0.0-rc10 introduces all major functionalities to be expected in v4.0.0:

  • Working tree manipulation: status, reset, checkout, add, remove, move and commit.
  • Diff for different objects and printing to unified diff format.
  • Better submodules support.
  • Improved git log API.

The release also contains major improvements in some performance areas, APIs to work with repositories over SSH and tons of bugfixes.

Notes

  • Go 1.8 is the minimum supported version for go-git.
  • API for the top-level package, plumbing/object and plumbing/transport are frozen with this release candidate. Backwards incompatible changes from this release until v4.0.0 should be minimal and affect only very low-level packages.
  • History has been filter-branched and does not match v4.0.0-rc9 and older.

Features

  • Submodules init and update (#270)
  • plumbing/storer: add RemoveReference (#269)
  • Add Repository.Log() method (fix #298) (#337)
  • worktree: status and reset implementation (#339)
  • worktree: reset and checkout support for submodules (#344)
  • worktree: add method (#361)
  • worktree: Commit method implementation (#375)
  • worktree: Remove and Move methods (#395)
  • format/diff: unified diff encoder and public API (#388)
  • transport: ssh, NewPublicKeys support for encrypted PEM files (#355)
  • support force push (refspec with +) (#366)

API

  • git: Repository methods changes (#296)
  • git: make Storer public in Repository (#263)
  • plumbing/storer: referenceIterator now returns the error if any (#286)
  • plumbing/object: move difftree to object package (#284)
  • plumbing/revlist: input as a slice of hashes instead of commits (#292)
  • issue #274: new filemode package (#297)
  • project: move imports from srcd.works to gopkg.in (#303)
  • plumbing/object: add WalkCommitHistoryPost func (#305)
  • Export raw config (#334)
  • transport: ssh, NewPublicKeys helper (#347)
  • transport: ssh, new DefaultAuthBuilder variable (#356)
  • transport: make Endpoint an interface, fixes #362 (#365)

Bug fixes

  • plumbing/transport: git, error on empty SSH_AUTH_SOCK (#282)
  • Fix missing objects if they where deltified using ref-delta (#258)
  • difftree should ignore changes in permissions between the old, deprecated, group writable and ordinary files (#285)
  • plumbing/cache: specify units in memory size (Fix #234) (#289)
  • Return values of Read not checked (fix #65) (#299)
  • Work around a Go bug when parsing timezones (#320)
  • object: fix Change.Files() method behavior (fix #317) (#324)
  • references.go: fix Parents from commit iterator (#319)
  • add support for .git as file, fixes #348 (#363)
  • do not convert local paths to URL, Windows-related (#368)
  • format/packfile: fix bug when the delta depth is equals to 50 (#374)

Documentation

  • README: add table with supported git features (#384)
  • add git checkout example + housekeeping (#331)
  • examples: commit example (#381)
  • Improved documentation (#259)
  • plumbing: improve documentation (Fix #242) (#288)
  • Remove TODOs from documentation (#294)
  • _examples: improve documentation (fix #238) (#293)
  • improve git package documentation (fix #231) (#295)
  • Updated README in-memory example. (#316)

Internals

  • format/packfile: improve binary delta algorithm (#400)
  • Lazily load object index (#333)
  • cshared: remove directory (Fix #236) (#277)
  • cache: move package to plumbing (#278)
  • travis update to 1.8 and makefile silence commands (#283)
  • Add fast_finish flag to travis configuration (#287)
  • difftree: simplify hash comparison with deprecated files modes (#300)
  • plumbing: Use ReadBytes() rather than ReadSlice() (#314)
  • fix go vet issues, add go vet to CI (#360)
  • add test for tags push, closes #354 (#367)
  • plumbing: index, Entries converted in a slice of pointers (#364)
  • transport/server: use Endpoint string representation as a map key (#394)
  • storage: filesystem, initialize the default folder scaffolding (#398)

v4.0.0-rc9

01 Feb 09:51
Compare
Choose a tag to compare
v4.0.0-rc9 Pre-release
Pre-release

Documentation updates and some minor fixes

v4.0.0-rc8

31 Jan 10:02
Compare
Choose a tag to compare
v4.0.0-rc8 Pre-release
Pre-release
  • transport/http: fix partial request with haves. Fix #216. (#221)
  • packfile: cache undeltified objects to improve decode performance (#218)
  • plumbing/object: adds Tree method to Tree (#224)
  • config: modules, marshal and unmarshal implementation 4e78181
  • new repository constructors and worktree 24c1878
  • object: modes in TreeEntry as os.FileMode, and not the git internal cf9efc6
  • storage: IndexStorer implementation de1c0bf
  • Repository.Progress moved as a field in *Options (#237) a48bc6e
  • new srcd.works/go-git.v4 import path