Skip to content

v0.13.0

@johnhaley81 johnhaley81 released this May 4, 2016 · 21 commits to master since this release

Summary

This is a big update! Lots of work was done to bring NodeGit up to the latest stable libgit2 version (v0.24.1), to use babel in the library, to make it more stable, remove memory leaks, squash bugs and in general just improve the library for all. Make sure to see all of the API changes below (there are a lot).

Node support

We have added Node 6 as a supported platform! Going forward we aim to have 1:1 support for versions of Node that are either current or LTS. That means that v0.12 will not be supported soon so if you're on that please upgrade to at least Node v4. Also Node v5 will NOT be LTS so when Node stops supporting that in the coming months we will as well. You can read more about the current Node upgrade plan here.

API Changes


Modified

  • Index#add, Index#addByPath, Index#clear, Index#conflictAdd, Index#conflictCleanup, Index#conflictGet, Index#conflictRemove, Index.open, Index#read, Index#readTree, Index#remove, Index#removeByPath, Index#removeDirectory, Index#read, Index#write, Index#writeTree, and Index#writeTreeTo are all now asynchronous functions PR #971
  • Made ancestoryEntry, outEntry and theirEntry optional parameters on Index#conflictAdd PR #997
  • Repository#refreshIndex will return an Index object back that has the latest data loaded off of disk PR #986
  • Commit.create is now asynchronous PR #1022

Added

  • Diff#merge will combine a diff into itself PR #1000
  • ReflogEntry#committer, ReflogEntry#idNew, ReflogEntry#idOld, and ReflogEntry#message have been added PR #1013

Removed

  • Repository#openIndex PR #990
  • Reflog#entryCommitter, Reflog#entryIdNew, Reflog#entryIdOld, and Reflog#entryMessage have been moved to be under ReflogEntry PR #1013

Bug fixes

Upgraded to libgit2 v0.24.1 PR #1010


Changes or improvements

  • Custom merge drivers can now be registered, which allows callers to
    configure callbacks to honor merge=driver configuration in
    .gitattributes.

  • Custom filters can now be registered with wildcard attributes, for
    example filter=*. Consumers should examine the attributes parameter
    of the check function for details.

  • Symlinks are now followed when locking a file, which can be
    necessary when multiple worktrees share a base repository.

  • You can now set your own user-agent to be sent for HTTP requests by
    using the Libgit2.OPT.SET_USER_AGENT with Libgit2.opts().

  • You can set custom HTTP header fields to be sent along with requests
    by passing them in the fetch and push options.

  • Tree objects are now assumed to be sorted. If a tree is not
    correctly formed, it will give bad results. This is the git approach
    and cuts a significant amount of time when reading the trees.

  • Filter registration is now protected against concurrent
    registration.

  • Filenames which are not valid on Windows in an index no longer cause
    to fail to parse it on that OS.

  • Rebases can now be performed purely in-memory, without touching the
    repository's workdir.

  • When adding objects to the index, or when creating new tree or commit
    objects, the inputs are validated to ensure that the dependent objects
    exist and are of the correct type. This object validation can be
    disabled with the Libgit2.OPT.ENABLE_STRICT_OBJECT_CREATION option.

  • The WinHTTP transport's handling of bad credentials now behaves like
    the others, asking for credentials again.

API additions

  • Blob.createFromStream() and
    Blob.createFromStreamCommit allow you to create a blob by
    writing into a stream. Useful when you do not know the final size or
    want to copy the contents from another stream.

  • Config#lock has been added, which allow for
    transactional/atomic complex updates to the configuration, removing
    the opportunity for concurrent operations and not committing any
    changes until the unlock.

  • DiffOptions added a new callback progress_cb to report on the
    progress of the diff as files are being compared. The documentation of
    the existing callback notify_cb was updated to reflect that it only
    gets called when new deltas are added to the diff.

  • FetchOptions and PushOptions have gained a customHeaders
    field to set the extra HTTP header fields to send.

  • Commit#headerField allows you to look up a specific header
    field in a commit.

Breaking API changes

  • MergeOptions now provides a defaultDriver that can be used
    to provide the name of a merge driver to be used to handle files changed
    during a merge.

  • The Merge.TREE_FLAG is now Merge.FLAG. Subsequently,
    treeFlags field of the MergeOptions structure is now named flags.

  • The Merge.FILE_FLAGS enum is now Merge.FILE_FLAG for
    consistency with other enum type names.

  • Cert descendent types now have a proper parent member

  • It is the responsibility of the refdb backend to decide what to do
    with the reflog on ref deletion. The file-based backend must delete
    it, a database-backed one may wish to archive it.

  • Index#add and Index#conflictAdd will now use the case
    as provided by the caller on case insensitive systems. Previous
    versions would keep the case as it existed in the index. This does
    not affect the higher-level Index#addByPath or
    Index#addFromBuffer functions.

  • The Config.LEVEL enum has gained a higher-priority value
    PROGRAMDATA which represent a rough Windows equivalent
    to the system level configuration.

  • RebaseOptions now has a mergeOptions field.

  • The index no longer performs locking itself. This is not something
    users of the library should have been relying on as it's not part of
    the concurrency guarantees.

  • Remote#connect() now takes a customHeaders argument to set
    the extra HTTP header fields to send.

  • Tree.entryFilemode, Tree.entryFilemodeRaw, Tree.entryId, Tree.entryName,
    Tree.entryToObject, and Tree.entryType have all been moved to the TreeEntry prototype.
    Additionally, the TreeEntry fields have been removed in lieu of the corresponding functions to return
    the data.

Downloads

v0.12.2

@johnhaley81 johnhaley81 released this Apr 7, 2016 · 106 commits to master since this release

Added

  • We now provide 32-bit binaries for linux PR #980

Bug fixes

Downloads

v0.12.1

@johnhaley81 johnhaley81 released this Mar 30, 2016 · 126 commits to master since this release

Bug fixes

  • Fixed post install script dying on windows PR #978

Downloads

v0.12.0

@johnhaley81 johnhaley81 released this Mar 28, 2016 · 128 commits to master since this release

API changes

  • Ignore
    • Made Ignore.pathIsIgnored async PR #970

Bug fixes

  • Added an error message when trying to install NodeGit without a required version of libstdc++ PR #972
  • Fix a crash when grabbing content out of a buffer that has unicode PR #966
  • Added some plumbing for better memory management PR #958
  • Fix checkoutOptions in Stash#apply PR #956
  • Fixed install when there is a space in the username on windows PR #951
  • Bump to nan@2.2.0 PR #952

Downloads

v0.11.9

@johnhaley81 johnhaley81 released this Mar 9, 2016 · 173 commits to master since this release

  • Fixed crash when calculating diff via ConvenientPatch PR #945

Downloads

v0.11.8

@johnhaley81 johnhaley81 released this Mar 7, 2016 · 178 commits to master since this release

  • Removed callback throttling due to segmentation faults. Will be implemented later. PR #943

Downloads

v0.11.7

@johnhaley81 johnhaley81 released this Mar 7, 2016 · 182 commits to master since this release

  • Added Repository#mergeheadForeach PR #937
  • Improved speed of all callbacks dramatically PR #932
  • Fixed Merge.merge docs to show it takes in an AnnotatedCommit and not a Commit PR #935
  • Fixed unicode in Diff.blobToBuffer getting corrupted PR #935
  • Fixed fetching/pulling to bitbucket in versions > v5.6 of node PR #942

Downloads

v0.11.6

@johnhaley81 johnhaley81 released this Mar 1, 2016 · 205 commits to master since this release

  • Added Repository#checkoutRef PR #891
  • Repository#createCommitOnHead no longer dies if the repo is empty PR #927
  • Fixed memory leak in Patch#convenientFromDiff PR #930
  • Generated files now have a header comment indicating that they are generated PR #924
  • Fixed http parsing errors in Node 5.6 PR #931
  • Fixed Tree#walk not returning the correct entries on end PR #929

Downloads

v0.11.5

@johnhaley81 johnhaley81 released this Feb 25, 2016 · 228 commits to master since this release

  • Fixed crash when calculating a diff PR #922
  • Fixed an issue with return values getting randomly corrupted PR #923

Downloads

v0.11.4

@johnhaley81 johnhaley81 released this Feb 24, 2016 · 233 commits to master since this release

  • Fixed callback out values in callbacks from C++. This affects any NodeGit call that is passed a callback as an option PR #921
  • Fixed an issue with building the debug version of NodeGit on windows PR #918

Downloads

Something went wrong with that request. Please try again.