nodegit

Native Node bindings to Git.

MIT License

Downloads
107K
Stars
5.6K
Committers
165
nodegit - v0.20.0 (2017-08-16)

Published by rcjsuen over 6 years ago

API Changes

  • Blob.createFromBuffer is now async
  • Blob.createFromWorkdir is now async
  • Added Blob.createFromDisk to create a blob from a file on disk
  • Added Blob.filteredContent to retrieve filtered content from a blob similar to as if it was being checked out to the working directory
  • Status.file is now async
  • Merge.merge is now async
  • Rebase.commit is now async
  • Rebase.abort is now async
  • Commit.amend is now async
  • Reflog.write is now async
  • Added Branch.remoteName to get the name of the remote of a branch
  • Filter's functions are now async
  • Added FilterRegistry to register and unregister filters.

Summary of changes bumping libgit2

PR #1329 bumped libgit2 which brought in many changes and bug fixes.

Included merged libgit2 PRs:

Included non-merged libgit2 PRs:

Summary of changes to NodeGit outside of libgit2 bump:

nodegit - v0.19.0

Published by johnhaley81 over 7 years ago

Summary of changes outside of libgit2 bump:

  • You can now convert tree entries in blobs PR #1272

Included merged libgit2 PRs:

Included non-merged libgit2 PRs:

nodegit - v0.18.0

Published by johnhaley81 over 7 years ago

API Changes

  • All callbacks that go to libgit2 now have an optional waitForResult flag that can be true/false. Defaults to false. When true it will not stop libgit2 from continuing on before the JS code is fully executed and resolved (in cases of a Promise). This is useful for progress callbacks (like fetching) where the bubbling up of the progress to JS doesn't really need the C/C++ code to wait for the JS code to fully handle the event before continuing. This can have serious performance implications for many callbacks that can be fired quite frequently.
  • given_opts in Revert.revert are now optional
  • checkout_opts in Reset.fromAnnotated and Reset.reset are now optional
  • Reset.fromAnnotated is now async
  • message on Stash.save is now optional
  • Added processMergeMessageCallback on Repository#mergeBranches to allow for custom merge messages
  • Add beforeFinishFn to Repository#rebaseBranches and Repository#continueRebase. This is called before the invocation of finish(). If the callback returns a promise, finish() will be called when the promise resolves. The beforeFinishFn will be called with an object that has on it:
    • ontoName The name of the branch that we rebased onto
    • ontoSha The sha that we rebased onto
    • originalHeadName The name of the branch that we rebased
    • originalHeadSha The sha of the branch that was rebased
    • rewitten which is an array of sha pairs that contain which contain what the commit sha was before the rebase and what the commit sha is after the rebase

Summary of Changes from bumping libgit2 to 43275f5

PR #1123 bumped libgit2 which brought in many changes and bug fixes.

Included merged libgit2 PRs:

Included non-merged libgit2 PRs:

Summary of Changes to NodeGit outside of libgit2 bump

  • Don't overwrite C++ files for things that haven't changed PR #1091
  • Add the option to "fire and forget" callbacks so libgit2 doesn't wait for JS to finish before proceeding PR #1208
  • Send back the error code from libgit2 when a call fails PR #1209
  • Initialize pointers to null PR #1210
  • Replace Gitter with Slack PR #1212
  • Make given_opts in Revert.revert optional PR #1213
  • Make Reset.fromAnnotated async and checkout_opts optional PR #1214
  • Make message on Stash.save optional PR #1215
  • Add Remote.ls to NodeGit PR #1218
  • Add processMergeMessageCallback to Repository#mergeBranches to allow for custom merge messages PR #1219
  • Bump libgit2 to 43275f5 PR #1223 from srajko/bump-libgit
  • Provide rebase details on finish PR #1224
  • Use wider int to calculate throttle window PR #1232
  • Update comment to reflect the correct path for generated code output PR #1236
  • Remove nwjs example from the docs PR #1238
  • Remove sudo requirement from linux 32-bit builds PR #1241
nodegit - v0.17.0

Published by johnhaley81 over 7 years ago

Targeted Platform Changes

In this release we had added support for Node v7 and latest Electron. We have removed support for Node v0.12 and v5.

We are also deprecating nw.js support since it is currently broken, no one in the current team uses it and we would not be able to currently support nw.js in an effective manner with a good user experience.

Now building against shared libcurl lib

For proxy support we now use libcurl for HTTP/HTTPS transport which should have no noticeable change in NodeGit remote operations but if changes are noticed this is worth mentioning as a potential source.

Memory leak fixes and stability increases

Many PR's were made to fix memory leaks as they were found so memory usage should go down in this version for long running scripts. Additionally, when performing operations with callbacks (transfer progress, credentials, etc...) there was a small chance for a segfault when NodeGit would schedule the callback to go into JavaScript. This is now fixed.

Fixes to the build

Many users, especially on windows, were experiencing errors during the build. The build still isn't perfect but a lot of the bugs were fixed.

Bump libgit2 to 0bf0526

The majority of changes to NodeGit v17 were in libgit2. The API breaking changes that are known are:

Summary of changes that were brought in:

https://github.com/nodegit/nodegit/pull/1187#issuecomment-277760323

Changes to NodeGit outside of libgit2 bump

  • Define GIT_SSH_MEMORY_CREDENTIALS for libgit2 PR #949
  • Add "Path" to ssh variable names in tests for clarity PR #1135
  • Fix revwalk memory leaks PR #1137
  • Fix tree entry leaks PR #1138
  • Fix typo in postinstall script PR #1141
  • Fix windows exception handling in build PR #1143
  • Fix CI failures on node 0.12 PR #1144
  • Fix postinstall script crash when install location has spaces in its path PR #1148
  • Update 0.13 changelog PR #1151
  • Minor documentation fix in Checkout.index PR #1164
  • FreeBSD also uses struct timespec st_mtim PR #1165
  • README.md needs to show where to get Slack invitation PR #1170
  • Add @async tag to Tree#getEntry PR #1178
  • Fix incorrect anchor link in TESTING.md PR #1179
  • Added tests for Tag PR #1180
  • Added tests for Branch PR #1181
  • Escape the spaces in dir for shell command PR #1186
  • Bump libgit to 0bf0526 PR #1187
  • Checkout's tree* functions do not support Oid as a parameter PR #1190
  • Build against shared library for libcurl PR #1195
  • Move libuv calls to correct thread PR #1197
  • Update Repository#createBranch docs PR #1198
  • Remove Node v0.12 and v5 PR #1199
  • Specify acceptable types for lookup and dwim in Reference PR #1203
  • Build for Node 7.4.0 PR #1204
  • Write the index to a repository directly in merge-cleanly.js examples PR #1205
nodegit - v0.16.0

Published by johnhaley81 over 7 years ago

  • Bump libssh2 to 1.7.0 PR #1071
  • Js cleanup PR #1074
  • Expose merge options and diff flags PR #1076
  • Fix Tree#entryByName function and add test PR #1079
  • Add isSubmodule() method PR #1080
  • Fix two typos in the documentation for Commit#parents PR #1081
  • Memory management: duplicate time PR #1090
  • Preempt nan to fix deprecated calls to Get/SetHiddenValue PR #1106
  • Try re-enabling node >6.2 PR #1107
  • Bump openssl to 1.0.2h (same as node 6.3.1) PR #1108
  • Don't run postbuild when we detect electron install PR #1111
  • Added instructions for CircleCI users PR #1113
  • Fix up electron and nw.js docs PR #1114
  • Patch libssh2 to work with vs2015 PR #1125
  • Fix CI PR #1126
nodegit - v0.14.1

Published by johnhaley81 over 8 years ago

  • Fix postinstall breaking build if it fails.
nodegit - v0.15.1

Published by johnhaley81 over 8 years ago

  • Fix postinstall breaking build if it fails.
nodegit - v0.15.0

Published by johnhaley81 over 8 years ago

This updates NodeGit to use the latest HEAD version of libgit2. The plan for staying on the official tagged releases of libgit2 is that they will get a maintenance branch and not-breaking API fixes will be backported to them. The first branch of this sort is maint/0.14. Going forward new releases of NodeGit will follow closely to the master branch of libgit2.

Summary of changes that were brought in:

https://github.com/libgit2/libgit2/commit/37dba1a739b5ee6c45dc9f3c0bd1f7f7a18f13f7

Changes or improvements

  • NodeGit.FetchOptions, and NodeGit.PushOptions now have a proxyOpts field that accepts a NodeGit.ProxyOptions object that allows NodeGit to use a proxy for all remote communication
  • NodeGit.MergeOptions has a defaultDriver field that lets the caller change the driver used to when both sides of a merge have changed

API additions

  • Commit.createWithSignature allows the caller to create a signed commit. There are no tests for this currently so it's labelled experimental.
  • Blob, Commit, Tag, and Tree all have a new prototype dup method on them to make a low-level copy of the libgit2 object if needed.
  • Odb#expandIds is exposed which takes in a list of short ids and expands them in-place to the full id of the object in the database
nodegit - v0.14.0

Published by johnhaley81 over 8 years ago

  • Improve lifecycle scripts and install process PR #1055
  • Fix example code PR #1058
nodegit - v0.13.2

Published by johnhaley81 over 8 years ago

  • Stop RevWalk#walk from swallowing errors in the callback PR #1047
  • Stop swallowing errors in the install script PR #1048
  • Fix initializing submodules when installing from npm PR #1050
nodegit - v0.13.1

Published by johnhaley81 over 8 years ago

Added

  • Repository#discardLines is now a thing PR #1021

Modified

  • Async methods now use a custom threadpool to prevent thread-locking the event loop PR #1019

Bug fixes

  • Fix building NodeGit from NPM PR #1026
  • Plug a memory leak in RevWalk.fastWalk PR #1030
  • Plug a memory leak with Oid PR #1033
  • Fixed some underlying libgit2 objects getting freed incorrectly PR #1036
nodegit - v0.13.0

Published by johnhaley81 over 8 years ago

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.
nodegit - v0.12.2

Published by johnhaley81 over 8 years ago

Added

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

Bug fixes

nodegit - v0.12.1

Published by johnhaley81 over 8 years ago

Bug fixes

  • Fixed post install script dying on windows PR #978
nodegit - v0.12.0

Published by johnhaley81 over 8 years ago

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 [email protected] PR #952
nodegit - v0.11.9

Published by johnhaley81 over 8 years ago

  • Fixed crash when calculating diff via ConvenientPatch PR #945
nodegit - v0.11.8

Published by johnhaley81 over 8 years ago

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

Published by johnhaley81 over 8 years ago

  • 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
nodegit - v0.11.6

Published by johnhaley81 over 8 years ago

  • 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
nodegit - v0.11.5

Published by johnhaley81 over 8 years ago

  • Fixed crash when calculating a diff PR #922
  • Fixed an issue with return values getting randomly corrupted PR #923
Package Rankings
Top 0.75% on Npmjs.org
Top 20.38% on Repo1.maven.org
Badges
Extracted from project README
Actions Status
Related Projects