nodegit

Native Node bindings to Git.

MIT License

Downloads
107K
Stars
5.6K
Committers
165
nodegit - v0.11.4

Published by johnhaley81 over 8 years ago

  • Fixed callback out values in callbacks from C++. This affects any NodeGit call that is passed a callback as an option PR #921
  • Fixed an issue with building the debug version of NodeGit on windows PR #918
nodegit - v0.11.3

Published by johnhaley81 over 8 years ago

  • Fixed an issue where initializing NodeGit would sometimes seg fault. Also fixed an error when fetching concurrently PR #912
nodegit - v0.11.2

Published by johnhaley81 over 8 years ago

  • Fixed an issue where when staging lines if the index is locked NodeGit just nuked it PR #906
  • Fixed diff calculation when staging lines/hunks PR #906
  • Fixed seg-fault in linux that happens when getting the diff of very small files PR #908
  • Fixed RevWalk#fastWalk dying when an error happens in libgit2 PR #909
nodegit - v0.11.1

Published by maxkorp over 8 years ago

  • Numerous fixes and perf boosts to file history
  • Several doc fixes
nodegit - v0.11.0

Published by johnhaley81 over 8 years ago

nodegit - v0.10.0

Published by johnhaley81 over 8 years ago

API changes

  • ConvenientPatch
    • ConvenientPatch does not have a patch or a delta property associated with it, if you were using the delta, please just use prototype methods oldFIle, newFile, and Status, which are stripped directly from the delta.
    • ConvenientPatch#hunks returns a promise with an array of ConvenientHunks.
  • ConvenientHunk
    • ConvenientHunk does not have an exposed diffHunk associated with it, but does have the same members as diffHunk:
      • size() : number of lines in the hunk
      • oldStart() : old starting position
      • oldLines() : number of lines in old file
      • newStart() : new starting position
      • newLines() : number of lines in new file
      • headerLen() : length of header
      • header() : returns the header of the hunk
      • lines() : returns a promise containing DiffLines, not ConvenientLines.
  • DiffLine
  • DiffLine now contains the members rawContent() and content().
    • rawContent() contains the unformatted content of the line. This is no longer a string from the line to the end of the file.
    • content() contains the utf8 formatted content of the line.
nodegit - v0.9.0

Published by johnhaley81 almost 9 years ago

  • Thread safe fix to stop crashing on releasing mutexes PR #876
  • Submodule#setIgnore, Submodule#setUpdate, and Submodule#setUrl are now all async. Submodule#status and Submodule#location are now available PR #867 and PR #870
  • Remote#defaultBranch is now available PR #872
  • Repository#mergeBranches now takes in a MergeOptions parameter PR #873
  • Remove a NodeGit specific hack to make Index#addAll faster since that is fixed in libgit2 PR #875
nodegit - v0.8.0

Published by johnhaley81 almost 9 years ago

  • Thread safe locking has been added and currently is defaulted to off. Use NodeGit.enableThreadSafety() to turn on
  • NodeGit no longer requires a specific Promise object from the nodegit-promise library to be passed in. You can now use whatever you want!
  • Repository#stageFilemode now can accept an array of strings for files to update
  • Submodule#addToIndex, Submodule#addFinalize, Submodule#init, Submodule#open, Submodule#sync, and Submodule#update are now all async methods
nodegit - v0.7.0

Published by johnhaley81 almost 9 years ago

  • Bumped openssl to 1.0.2e to fix issues with prebuilts on linux platforms
  • Fixed a bug with GIT_ITER_OVER breaking rebase and other iterative methods
  • Make GraphDescendentOf asynchronous
  • Fixed line length of utf8 strings
nodegit - v0.6.3

Published by maxkorp almost 9 years ago

  • Fixed a bug where manually building for vanilla node would fail without explicitly setting the target
nodegit - v0.6.2

Published by maxkorp almost 9 years ago

  • Fixed a bug where manually building on windows would fail (if unable to download a prebuilt binary)
nodegit - v0.6.1

Published by maxkorp almost 9 years ago

  • Fixed Treebuildter.create to have an optional source
  • Added Repository.getSubmoduleNames
  • Added Submodule.Foreach
nodegit - v0.6.0

Published by johnhaley81 almost 9 years ago

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

Published by johnhaley81 about 9 years ago

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.

nodegit - v0.4.1

Published by maxkorp over 9 years ago

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

Published by tbranyen over 9 years ago

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.

nodegit - v0.3.3

Published by johnhaley81 over 9 years ago

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.

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

Published by johnhaley81 over 9 years ago

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

nodegit - Fixes installation problems

Published by tbranyen over 9 years ago

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.

nodegit - v0.3.0

Published by johnhaley81 over 9 years ago

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

Package Rankings
Top 0.75% on Npmjs.org
Top 20.38% on Repo1.maven.org
Badges
Extracted from project README
Actions Status
Related Projects