Skip to content

Releases: nodegit/nodegit

v0.6.2

Choose a tag to compare

@maxkorp maxkorp released this 16 Dec 16:34
  • Fixed a bug where manually building on windows would fail (if unable to download a prebuilt binary)

v0.6.1

Choose a tag to compare

@maxkorp maxkorp released this 14 Dec 18:48
  • Fixed Treebuildter.create to have an optional source
  • Added Repository.getSubmoduleNames
  • Added Submodule.Foreach

v0.6.0

Choose a tag to compare

@johnhaley81 johnhaley81 released this 09 Dec 00:22
  • Added file mode staging
  • Added a fast rev walk to do the rev walk in C++ and bubble the result up to JS
  • Updated to latest libgit2
  • Updated to latest openssl
  • Updated to latest nodegit-promise
  • Removed c++11 dependency
  • Fixed weirdness in lifecycle scripts
  • Added downloading prebuilt binaries for electron

v0.5.0

Choose a tag to compare

@johnhaley81 johnhaley81 released this 21 Oct 17:23

API Changes

AnnotatedCommit

NodeGit.AnnotatedCommit.fromRevspec(repository, revspec)
NodeGit now allows finding commits by their extended sha syntax string.

Branch

NodeGit.Branch.create(repo, branchName, target, force)
No longer has signature / log message.

NodeGit.Branch.createFromAnnotated(repository, branchName, commit, force)
Creates a branch at the specified commit. Force is optional.

NodeGit.Branch.move(branch, newBranchName, force)
No longer has signature / log message.

Checkout

CheckoutOptions
CheckoutStragey no longer takes NodeGit.Checkout.STRATEGY.SAFE_CREATE. Use NodeGit.Checkout.STRATEGY.SAFE | NodeGit.Checkout.STRATEGY.RECREATE_MISSING in its place.

Clone

CloneOptions
Clone Options no longer contains a RemoteCallbacks field, and instead contains a FetchOptions field which contains a RemoteCallbacks field.
This affects the any and all clone operations which were using RemoteCallbacks.

Commit

Commit.prototype.headerField(field)
Returns a field from the headers of a commit.

Config

Config.prototype.getString(name)
Config.prototype.getString() is deprecated and is no longer in the API. Use Config.prototype.getStringBuf(name) instead.

Cred

NodeGit.Cred.sshKeyMemoryNew(username, publickey, privatekey, passphrase)
Returns a credentials object for the given username, publickey, privatekey, passphrase which are all strings.

Diff

NodeGit.Diff.blobToBuffer(buffer_as_path, options, file_cb, binary_cb, hunk_cb, line_cb, payload)
Diff.blobToBuffer now takes an additional argument binary_cb which is the binary callback. Binary callback will be called for binary diffs.

FetchOptions

FetchOptions
FetchOptions now contains a RemoteCallbacks field called callbacks.
Fields:

  • callbacks : RemoteCallbacks
  • prune - NodeGit.Fetch.PRUNE
    • GIT_FETCH_PRUNE_UNSPECIFIED
    • GIT_FETCH_PRUNE
    • GIT_FETCH_NO_PRUNE
  • updateFetchhead : Number - defaults to 1, leave 1 in order to behave like git, treat 0 as off
  • downloadTags : NodeGit.Remote.AUTOTAG_OPTION
    • DOWNLOAD_TAGS_UNSPECIFIED
    • DOWNLOAD_TAGS_AUTO
    • DOWNLOAD_TAGS_NONE
    • DOWNLOAD_TAGS_ALL

Index

NodeGit.Index.entryIsConflict(entry)
Returns 1 if the index entry is a conflict, 0 if it is not. Entry is of type NodeGit.Index.IndexEntry

Rebase

Rebase.protype.abort()
No longer has signature / log message.

Rebase.prototype.operationCurrent()
Rebase.prototype.currentOperation no longer returns 0 when a rebase has been initialized, but not started. (0th step of the rebase). It now returns either the maximum value of unsigned integer 32 or 64 depending on the bits of the operating machine.

NodeGit.Rebase.init(repository, branch, upstream, onto, options)
Rebase.init no longer takes signature argument. branch can now be set to NULL to rebase the current branch.

Rebase.prototype.next()
Rebase.prototype.next no longer takes any arguments.

NodeGit.Rebase.open(repository, options)
Rebase.open now takes a RebaseOptions parameter to specify how the rebase should be performed.

RebaseOptions
RebaseOptions now has a CheckoutOptions field named checkoutOptions. You can set the strategy for the way rebase checks out using it.

Reference

NodeGit.Reference.create(repo, name, id, force, logMessage)
No longer takes signature argument

NodeGit.Reference.createMatching(repo, name, id, force, currentId, logMessage)
No longer takes signature argument

Reference.prototype.rename(newName, force, logMessage)
No longer takes signature argument

Reference.prototype.setTarget(fromCommitOid, message)
Reference.prototype.setTarget no longer takes signature as an argument.

Reference.prototype.symbolicCreate(repo, name, target, force, logMessage)
No longer takes signature argument

Reference.prototype.symbolicCreateMatching(name, target, force)
No longer has signature / log message.

Reference.prototype.symbolicSetTarget(name, logMessage)
Reference.prototype.symbolicSetTarget no longer takes 3 arguments and only takes name, and logMessage.

Remote

NodeGit.Remote.addFetch(repo, remote, refspec)
Now changes the repository's configuration

NodeGit.Remote.addPush(repo, remote, refspec)
Now changes the repository's configuration

Remote.prototype.clearRefspecs()
Deprecated, no longer exists.

Remote.connect(direction, callbacks)
Now takes callbacks.

NodeGit.Remote.createAnonymous(repo, url)
No longer takes refspecs argument.

Remote.prototype.download(refspecs, opts)
Remote.prototype.download now takes an options parameter.

Remote.prototype.fetch(refspecs, opts, reflog_message)
Remote.prototype.fetch now takes an options parameter.

Remote.prototype.prune(callbacks)
Now takes callbacks.

Remote.prototype.push(refspecs, opts)
Remote.prototype.push now takes an options parameter.

Remote.prototype.save()
Deprecated, no longer exists.

NodeGit.Remote.setAutoTag(repo, remote, value)
Now changes the repository's configuration

Remote.prototype.setCallbacks()
Deprecated, no longer exists. Now pass callbacks as part of FetchOptions parameters in Remote method calls.

Remote.prototype.setFetchRefspecs()
Deprecated, no longer exists.

Remote.prototype.setPushRefspecs()
Deprecated, no longer exists.

Remote.prototype.setPushurl(repository, remote, url)
Remote.prototype.setPushurl takes 3 arguments, where remote is the name of the remote. In order for the change to take effect, you will need to lookup the remote again.

Remote.prototype.setTransport()
Deprecated, no longer exists.

NodeGit.Remote.setUrl(repo, remote, url)
Now changes the repository's configuration

Remote.prototype.updateTips(callbacks, updateFetchhead, downloadTags, reflogMessage)
No longer takes signature argument, takes a NodeGit.Remote.Callbacks object

Repository

Repository.prototype.createBranch(name, commit, force)
Repository.prototype.createBranch no longer takes 5 arguments, it now just takes name, commit, and force.

Repository.prototype.detachHead()
No longer has signature / log message.

Repository.prototype.fetch(remote, fetchOptions, callback)
Repository.prototype.fetch now no longer takes autoTag, remoteCallbacks, or pruneAfter arguments. AutoTag, pruneAfter, and remoteCallbacks can all be assigned through fetchOptions.

Repository.prototype.fetchAll(fetchOptions, callback)
Repository.prototype.fetchAll no longer takes autoTag and pruneAfter. See api changes relating to fetch options.

Repository.prototype.setHead(name)
Repository.prototype.setHead no longer takes 3 arguments and only takes name.

Repository.prototype.setHeadDetached(commit)
No longer has signature / log message.

Repository.prototype.setHeadDetachedFromAnnotated(commit)
Makes the repostiory head directly point to the commit

Reset

NodeGit.Reset.reset(repo, target, resetType, opts)
Reset.reset now takes 4 arguments, and no longer takes signature or logMessage. Opts is a CheckoutOptions

NodeGit.Reset.resetFromAnnotated(repo, commit, resetType, opts)
Works the same way as reset, but takes an annotated commit as the target. Allows for more exact reflogs.

Stash

StashApplyOptions
Fields

ApplyProgress
Values:

  • NONE
  • LOADING_STASH
  • ANALYZE_INDEX
  • ANALYZE_MODIFIED
  • ANALYZE_UNTRACKED
  • CHECKOUT_UNTRACKED
  • CHECKOUT_MODIFIED
  • DONE

NodeGit.Stash.apply(repo, index, options)
Applies the stash at the specified index with the specified ApplyStashOptions. Apply will leave the stash in tact. Index 0 is the most recent stash.

NodeGit.Stash.FLAGS
Fields:

  • flags : NodeGit.Stash.APPLY_FLAGS
    • DEFAULT
    • REINSTATE_INDEX
  • checkoutOptions : NodeGit.CheckoutOptions
  • progress_cb : function(progress)
    • progress : NodeGit.Stash.APPLY_PROGRESS
      NodeGit.Stash.forEach()

NodeGit.Stash.drop(repo, index)
Drops the stash at index.

NodeGit.Stash.pop(repo, index, options)
Applies the stash at the specified index with the specified ApplyStashOptions, and on success, erases the stash at that index.

NodeGit.Stash.save(repo, owner, message, flags)
Stashes changes to the working directory. Owner is a signature type. Message is the name of the stash. For flags, see NodeGit.Stash.FLAGS.

Submodule

NodeGit.Submodule.reloadAll()
Deprecated, no longer exists.

Submodule.prototype.save()
Deprecated, no longer exists.

NodeGit.Submodule.setFetchRecurseSubmodules(repo, name, fetchRecurseSubmodules)
NodeGit.Submodule.setIgnore(repo, name, ignore)
NodeGit.Submodule.setUpdate(repo, name, update)
NodeGit.Submodule.setUrl(repo, name, url)
Changes the repository's configuration.

v0.4.1

Choose a tag to compare

@maxkorp maxkorp released this 02 Jun 20:21

Several Fixes, primarily:

  • Fixes the build in windows
  • Upgrades Nan, fixing issues in newer versions of iojs
  • Lots of new tests
  • New cherry pick and merge methods

v0.4.0

Choose a tag to compare

@tbranyen tbranyen released this 07 May 20:11

We've made a lot of solid progress and this version includes a number of changes.

Most notable:

  • Added Stash/Note methods
  • ConvenienceLine constructor added
  • Fixed issues with Repository.prototype.mergeBranches
  • Create methods are now synchronous
  • Added code coverage spanning C++ and JavaScript
  • Fixed the process hang
  • Requiring nodegit will now display more accurate failures

Successfully upgraded all dependencies except for nan, bumping to ~1.8 caused breakage in Linux 0.12.

v0.3.3

Choose a tag to compare

@johnhaley81 johnhaley81 released this 16 Mar 21:35

Some dev dependencies weren't being downloaded correctly with some configurations. This will force a download of all dev dependencies in the situation that we have to build.

No API changes.

v0.3.2 (atom-shell/nw.js fix)

Choose a tag to compare

@johnhaley81 johnhaley81 released this 16 Mar 17:52

This release fixes the build process when installing to atom-shell or nw.js in node.js 0.12. No API changes.

Fixes installation problems

Choose a tag to compare

@tbranyen tbranyen released this 14 Mar 19:21

We had a regression where node-pre-gyp would not attempt to fetch from S3 when installing from NPM. This has been fixed in this version. No API changes in this release.

v0.3.0

Choose a tag to compare

@johnhaley81 johnhaley81 released this 13 Mar 21:41

Big update!!

Updated to libgit2 v0.22.1. This release contains breaking API changes. Most noteworthy is the change to how certificate errors are handled during authentication.

For more details check out the change log: http://www.nodegit.org/changelog/#v0-3-0