Update nodegit to version 0.13.0 π #55
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Hello π
πππ
nodegit just published its new version 0.13.0, which is not covered by your current version range.
If this pull request passes your tests you can publish your software with the latest version of nodegit β otherwise use this branch to work on adaptions and fixes.
Happy fixing and merging π΄
GitHub 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#writeTree
, andIndex#writeTreeTo
are all now asynchronous functions PR #971ancestoryEntry
,outEntry
andtheirEntry
optional parameters onIndex#conflictAdd
PR #997Repository#refreshIndex
will return an Index object back that has the latest data loaded off of disk PR #986Commit.create
is now asynchronous PR #1022Added
Diff#merge
will combine a diff into itself PR #1000ReflogEntry#committer
,ReflogEntry#idNew
,ReflogEntry#idOld
, andReflogEntry#message
have been added PR #1013Removed
Repository#openIndex
PR #990Reflog#entryCommitter
,Reflog#entryIdNew
,Reflog#entryIdOld
, andReflog#entryMessage
have been moved to be underReflogEntry
PR #1013Bug fixes
Branch.name
works now PR #991Tree#entryByName
PR #998Commit#getDiffWithOptions
now actually passes the options correctly PR #1008Upgraded 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 parameterof 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
withLibgit2.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()
andBlob.createFromStreamCommit
allow you to create a blob bywriting 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 fortransactional/atomic complex updates to the configuration, removing
the opportunity for concurrent operations and not committing any
changes until the unlock.
DiffOptions
added a new callbackprogress_cb
to report on theprogress of the diff as files are being compared. The documentation of
the existing callback
notify_cb
was updated to reflect that it onlygets called when new deltas are added to the diff.
FetchOptions
andPushOptions
have gained acustom_headers
field to set the extra HTTP header fields to send.
Commit#headerField
allows you to look up a specific headerfield in a commit.
Breaking API changes
MergeOptions
now provides adefaultDriver
that can be usedto provide the name of a merge driver to be used to handle files changed
during a merge.
The
Merge.TREE_FLAG
is nowMerge.FLAG
. Subsequently,treeFlags
field of theMergeOptions
structure is now namedflags
.The
Merge.FILE_FLAGS
enum is nowMerge.FILE_FLAG
forconsistency with other enum type names.
Cert
descendent types now have a properparent
memberIt 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
andIndex#conflictAdd
will now use the caseas 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
orIndex#addFromBuffer
functions.The
Config.LEVEL
enum has gained a higher-priority valuePROGRAMDATA
which represent a rough Windows equivalentto the system level configuration.
RebaseOptions
now has amergeOptions
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 acustomHeaders
argument to setthe extra HTTP header fields to send.
Tree.entryFilemode
,Tree.entryFilemodeRaw
,Tree.entryId
,Tree.entryName
,Tree.entryToObject
, andTree.entryType
have all been moved to theTreeEntry
prototype.Additionally, the
TreeEntry
fields have been removed in lieu of the corresponding functions to returnthe data.
This pull request was created by greenkeeper.io.
Tired of seeing this sponsor message? Upgrade to the supporter plan! You'll also get your pull requests faster β‘It keeps your software up to date, all the time.