Published by rcjsuen over 6 years ago
Blob.createFromBuffer
is now asyncBlob.createFromWorkdir
is now asyncBlob.createFromDisk
to create a blob from a file on diskBlob.filteredContent
to retrieve filtered content from a blob similar to as if it was being checked out to the working directoryStatus.file
is now asyncMerge.merge
is now asyncRebase.commit
is now asyncRebase.abort
is now asyncCommit.amend
is now asyncReflog.write
is now asyncBranch.remoteName
to get the name of the remote of a branchFilter
's functions are now asyncFilterRegistry
to register and unregister filters.PR #1329 bumped libgit2 which brought in many changes and bug fixes.
GIT_OPT_ENABLE_SYNCHRONOUS_OBJECT_CREATION
#4259Published by johnhaley81 over 7 years ago
mmap_ro_file
#4201odb.h
#4188map_free
macros #4166Published by johnhaley81 over 7 years ago
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 optionalcheckout_opts
in Reset.fromAnnotated
and Reset.reset
are now optionalReset.fromAnnotated
is now asyncmessage
on Stash.save
is now optionalprocessMergeMessageCallback
on Repository#mergeBranches
to allow for custom merge messagesbeforeFinishFn
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 ontoontoSha
The sha that we rebased ontooriginalHeadName
The name of the branch that we rebasedoriginalHeadSha
The sha of the branch that was rebasedrewitten
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 rebasePR #1123 bumped libgit2 which brought in many changes and bug fixes.
given_opts
in Revert.revert
optional PR #1213
Reset.fromAnnotated
async and checkout_opts
optional PR #1214
message
on Stash.save
optional PR #1215
Remote.ls
to NodeGit PR #1218
processMergeMessageCallback
to Repository#mergeBranches
to allow for custom merge messages PR #1219
sudo
requirement from linux 32-bit builds PR #1241
Published by johnhaley81 over 7 years ago
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.
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.
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.
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.
The majority of changes to NodeGit v17 were in libgit2. The API breaking changes that are known are:
RevWalk
is returning different results libgit2 PR #3921
Summary of changes that were brought in:
https://github.com/nodegit/nodegit/pull/1187#issuecomment-277760323
Tree#getEntry
PR #1178
Repository#createBranch
docs PR #1198
lookup
and dwim
in Reference PR #1203
Published by johnhaley81 over 7 years ago
Published by johnhaley81 over 8 years ago
Published by johnhaley81 over 8 years ago
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:
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 communicationNodeGit.MergeOptions
has a defaultDriver
field that lets the caller change the driver used to when both sides of a merge have changedCommit.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 databasePublished by johnhaley81 over 8 years ago
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).
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.
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
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
Diff#merge
will combine a diff into itself PR #1000
ReflogEntry#committer
, ReflogEntry#idNew
, ReflogEntry#idOld
, and ReflogEntry#message
have been addedRepository#openIndex
PR #990
Reflog#entryCommitter
, Reflog#entryIdNew
, Reflog#entryIdOld
, and Reflog#entryMessage
have been moved to be under ReflogEntry
Branch.name
works now PR #991
Tree#entryByName
PR #998
Commit#getDiffWithOptions
now actually passes the options correctly PR #1008
merge=driver
configuration in.gitattributes
.filter=*
. Consumers should examine the attributes parametercheck
function for details.Libgit2.OPT.SET_USER_AGENT
with Libgit2.opts()
.Libgit2.OPT.ENABLE_STRICT_OBJECT_CREATION
option.Blob.createFromStream()
andBlob.createFromStreamCommit
allow you to create a blob byConfig#lock
has been added, which allow forDiffOptions
added a new callback progress_cb
to report on thenotify_cb
was updated to reflect that it onlyFetchOptions
and PushOptions
have gained a customHeaders
Commit#headerField
allows you to look up a specific headerMergeOptions
now provides a defaultDriver
that can be usedMerge.TREE_FLAG
is now Merge.FLAG
. Subsequently,treeFlags
field of the MergeOptions
structure is now named flags
.Merge.FILE_FLAGS
enum is now Merge.FILE_FLAG
forCert
descendent types now have a proper parent
memberIndex#add
and Index#conflictAdd
will now use the caseIndex#addByPath
orIndex#addFromBuffer
functions.Config.LEVEL
enum has gained a higher-priority valuePROGRAMDATA
which represent a rough Windows equivalentRebaseOptions
now has a mergeOptions
field.Remote#connect()
now takes a customHeaders
argument to setTree.entryFilemode
, Tree.entryFilemodeRaw
, Tree.entryId
, Tree.entryName
,Tree.entryToObject
, and Tree.entryType
have all been moved to the TreeEntry
prototype.TreeEntry
fields have been removed in lieu of the corresponding functions to returnPublished by johnhaley81 over 8 years ago
Ignore
Ignore.pathIsIgnored
async PR #970
checkoutOptions
in Stash#apply
PR #956
Published by johnhaley81 over 8 years ago
Repository#mergeheadForeach
PR #937
Merge.merge
docs to show it takes in an AnnotatedCommit
and not a Commit
PR #935
Diff.blobToBuffer
getting corrupted PR #935
Published by johnhaley81 over 8 years ago
Repository#checkoutRef
PR #891
Repository#createCommitOnHead
no longer dies if the repo is empty PR #927
Patch#convenientFromDiff
PR #930
Tree#walk
not returning the correct entries on end
PR #929