-
Notifications
You must be signed in to change notification settings - Fork 697
Update libgit2 v0.24.1 #1010
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Update libgit2 v0.24.1 #1010
Conversation
libgit2 isn't an actual submodule so this just causes problems
|
|
084d49c to
295f507
Compare
|
💥 and we're green on CI! |
|
@nodegit/owners anybody want to weigh in on this? |
|
👍 I'd just recommend adding the changes from 295f507 to the release notes, namely that |
|
Alright, we're going live! |


This updates NodeGit to use the latest stable version of libgit2. Many things are broken/changed and this will require a minor bump in the version number. Which is ok since we had to do that anyways for the next release.
This is almost an entire year of libgit2 changes so a lot of stuff is fixed/changed/removed and I believe I'm even more bald now than I was when I started this thing. Which is really impressive because there's not much left.
Summary of changes that were brought in:
v0.24.0 and v0.24.1
Changes or improvements
configure callbacks to honor
merge=driverconfiguration in.gitattributes.example
filter=*. Consumers should examine the attributes parameterof the
checkfunction for details.necessary when multiple worktrees share a base repository.
using the
Libgit2.OPT.SET_USER_AGENTwithLibgit2.opts().by passing them in the fetch and push options.
correctly formed, it will give bad results. This is the git approach
and cuts a significant amount of time when reading the trees.
registration.
to fail to parse it on that OS.
repository's workdir.
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_CREATIONoption.the others, asking for credentials again.
API additions
Blob.createFromStream()andBlob.createFromStreamCommitallow 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#lockhas 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.
DiffOptionsadded a new callbackprogress_cbto report on theprogress of the diff as files are being compared. The documentation of
the existing callback
notify_cbwas updated to reflect that it onlygets called when new deltas are added to the diff.
FetchOptionsandPushOptionshave gained acustom_headersfield to set the extra HTTP header fields to send.
Commit#headerFieldallows you to look up a specific headerfield in a commit.
Breaking API changes
MergeOptionsnow provides adefaultDriverthat can be usedto provide the name of a merge driver to be used to handle files changed
during a merge.
Merge.TREE_FLAGis nowMerge.FLAG. Subsequently,treeFlagsfield of theMergeOptionsstructure is now namedflags.Merge.FILE_FLAGSenum is nowMerge.FILE_FLAGforconsistency with other enum type names.
Certdescendent types now have a properparentmemberwith the reflog on ref deletion. The file-based backend must delete
it, a database-backed one may wish to archive it.
Index#addandIndex#conflictAddwill 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#addByPathorIndex#addFromBufferfunctions.Config.LEVELenum has gained a higher-priority valuePROGRAMDATAwhich represent a rough Windows equivalentto the system level configuration.
RebaseOptionsnow has amergeOptionsfield.users of the library should have been relying on as it's not part of
the concurrency guarantees.
Remote#connect()now takes acustomHeadersargument to setthe extra HTTP header fields to send.
Tree.entryFilemode,Tree.entryFilemodeRaw,Tree.entryId,Tree.entryName,Tree.entryToObject, andTree.entryTypehave all been moved to theTreeEntryprototype.Additionally, the
TreeEntryfields have been removed in lieu of the corresponding functions to returnthe data.