From aad2725fda1290ec1537d6c50dbf2247395bac95 Mon Sep 17 00:00:00 2001 From: Petr Korolev Date: Thu, 5 Mar 2015 20:03:17 +0200 Subject: [PATCH 01/60] Added automatically generated change log file --- CHANGELOG.md | 1049 ++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 1049 insertions(+) create mode 100644 CHANGELOG.md diff --git a/CHANGELOG.md b/CHANGELOG.md new file mode 100644 index 000000000..20ae4e40e --- /dev/null +++ b/CHANGELOG.md @@ -0,0 +1,1049 @@ +# Change Log + +## [Unreleased](https://github.com/nodegit/nodegit/tree/HEAD) + +[Full Changelog](https://github.com/nodegit/nodegit/compare/v0.2.7...HEAD) + +**Closed issues:** + +- Suppress astyle errors [\#459](https://github.com/nodegit/nodegit/issues/459) + +- io.js support [\#447](https://github.com/nodegit/nodegit/issues/447) + +- Meteor: icon fonts not working \(Resource interpreted as Font but transferred with MIME type text/html\) [\#443](https://github.com/nodegit/nodegit/issues/443) + +- Don't let users set the payloads through JS [\#436](https://github.com/nodegit/nodegit/issues/436) + +- Transfer callback stats are being converted wrong [\#432](https://github.com/nodegit/nodegit/issues/432) + +- fetchAll\(\) fails unless a default signature is available [\#431](https://github.com/nodegit/nodegit/issues/431) + +- Push example needs to be updated [\#429](https://github.com/nodegit/nodegit/issues/429) + +- Question: Is there a certificateCheck option available for pushing to a remote repository? [\#420](https://github.com/nodegit/nodegit/issues/420) + +- Repository.open returns empty object [\#412](https://github.com/nodegit/nodegit/issues/412) + +- Missing documentation for Tree.walk\(\) [\#411](https://github.com/nodegit/nodegit/issues/411) + +- comparing from 0.1.4 to 0.2.0 [\#410](https://github.com/nodegit/nodegit/issues/410) + +- Potential example issue in add-and-commit.js L45-48 [\#409](https://github.com/nodegit/nodegit/issues/409) + +- failed to install on ubuntu 14.04 [\#408](https://github.com/nodegit/nodegit/issues/408) + +- Return promises instead of nesting them [\#407](https://github.com/nodegit/nodegit/issues/407) + +- segfault when cloning from private BitBucket repo [\#406](https://github.com/nodegit/nodegit/issues/406) + +- Subtrees + custom error handling [\#400](https://github.com/nodegit/nodegit/issues/400) + +- Callbacks need to handle more use-cases [\#395](https://github.com/nodegit/nodegit/issues/395) + +- How to use nodegit in atom shell ..... [\#393](https://github.com/nodegit/nodegit/issues/393) + +- Cannot create a new branch [\#391](https://github.com/nodegit/nodegit/issues/391) + +- Remove fixappveyor from clone tests [\#385](https://github.com/nodegit/nodegit/issues/385) + +- Commit isn't working [\#381](https://github.com/nodegit/nodegit/issues/381) + +- Rename combyne folder to templates [\#378](https://github.com/nodegit/nodegit/issues/378) + +- Building for atom-shell v0.21.0 fails [\#376](https://github.com/nodegit/nodegit/issues/376) + +- Cloning SSH repos seem to fail [\#372](https://github.com/nodegit/nodegit/issues/372) + +- Commit.getDiff is backwards? [\#368](https://github.com/nodegit/nodegit/issues/368) + +- List all files in repo \(git ls-tree\) [\#365](https://github.com/nodegit/nodegit/issues/365) + +- Cloning locks up when more than 3 at the same time. [\#364](https://github.com/nodegit/nodegit/issues/364) + +- Checking out a branch [\#361](https://github.com/nodegit/nodegit/issues/361) + +- nodegit no longer builds in nwjs [\#360](https://github.com/nodegit/nodegit/issues/360) + +- Update to v0.22 of libgit2 [\#355](https://github.com/nodegit/nodegit/issues/355) + +- Module install/build fails on Heroku [\#332](https://github.com/nodegit/nodegit/issues/332) + +- 2 Step Authentication [\#323](https://github.com/nodegit/nodegit/issues/323) + +- Needed Examples for 0.3.0 [\#321](https://github.com/nodegit/nodegit/issues/321) + +- Tests randomly failing in AppVeyor [\#316](https://github.com/nodegit/nodegit/issues/316) + +- Start using prepublishing to fix dependencies [\#301](https://github.com/nodegit/nodegit/issues/301) + +- Get commits history only for a file [\#220](https://github.com/nodegit/nodegit/issues/220) + +- enable Index.addAll and related [\#131](https://github.com/nodegit/nodegit/issues/131) + +**Merged pull requests:** + +- Don't assign enums to \_\_proto\_\_ [\#464](https://github.com/nodegit/nodegit/pull/464) ([orderedlist](https://github.com/orderedlist)) + +- Adds support for strarray in structs [\#461](https://github.com/nodegit/nodegit/pull/461) ([orderedlist](https://github.com/orderedlist)) + +- supress astyle warnings [\#460](https://github.com/nodegit/nodegit/pull/460) ([maxkorp](https://github.com/maxkorp)) + +- Template proto functions [\#458](https://github.com/nodegit/nodegit/pull/458) ([maxkorp](https://github.com/maxkorp)) + +- Remote push [\#457](https://github.com/nodegit/nodegit/pull/457) ([mattyclarkson](https://github.com/mattyclarkson)) + +- Include missing lib files in nodegit.js template [\#455](https://github.com/nodegit/nodegit/pull/455) ([orderedlist](https://github.com/orderedlist)) + +- StrArray memory fix [\#454](https://github.com/nodegit/nodegit/pull/454) ([mattyclarkson](https://github.com/mattyclarkson)) + +- Better cloning with NodeGit [\#453](https://github.com/nodegit/nodegit/pull/453) ([tbranyen](https://github.com/tbranyen)) + +- Add Diff.prototype.findSimilar [\#452](https://github.com/nodegit/nodegit/pull/452) ([orderedlist](https://github.com/orderedlist)) + +- Str array converter fix [\#451](https://github.com/nodegit/nodegit/pull/451) ([mattyclarkson](https://github.com/mattyclarkson)) + +- Default signature always returns valid signature [\#450](https://github.com/nodegit/nodegit/pull/450) ([johnhaley81](https://github.com/johnhaley81)) + +- Status.byIndex and StatusEntry [\#448](https://github.com/nodegit/nodegit/pull/448) ([orderedlist](https://github.com/orderedlist)) + +- Upgrade to nan 1.7.0 [\#446](https://github.com/nodegit/nodegit/pull/446) ([orderedlist](https://github.com/orderedlist)) + +- Added in an HTTP url for test [\#445](https://github.com/nodegit/nodegit/pull/445) ([tbranyen](https://github.com/tbranyen)) + +- Add examples [\#442](https://github.com/nodegit/nodegit/pull/442) ([johnhaley81](https://github.com/johnhaley81)) + +- hide callback payloads from javascript [\#441](https://github.com/nodegit/nodegit/pull/441) ([maxkorp](https://github.com/maxkorp)) + +- Fix transfer callback stats [\#440](https://github.com/nodegit/nodegit/pull/440) ([johnhaley81](https://github.com/johnhaley81)) + +- Put `uv\_async\_init` on main thread [\#438](https://github.com/nodegit/nodegit/pull/438) ([johnhaley81](https://github.com/johnhaley81)) + +- Fix libuv threading issue [\#435](https://github.com/nodegit/nodegit/pull/435) ([johnhaley81](https://github.com/johnhaley81)) + +- Automatically free repositories post clone [\#434](https://github.com/nodegit/nodegit/pull/434) ([tbranyen](https://github.com/tbranyen)) + +- Skip transfer progress test until it's fixed [\#433](https://github.com/nodegit/nodegit/pull/433) ([johnhaley81](https://github.com/johnhaley81)) + +- git\_create\_tag doesn't have the correct descriptor [\#430](https://github.com/nodegit/nodegit/pull/430) ([mattyclarkson](https://github.com/mattyclarkson)) + +- Change environment to default for upgraded service [\#428](https://github.com/nodegit/nodegit/pull/428) ([maxkorp](https://github.com/maxkorp)) + +- Make the `git\_remote\_push` function async [\#427](https://github.com/nodegit/nodegit/pull/427) ([johnhaley81](https://github.com/johnhaley81)) + +- Fix file lock 2 [\#426](https://github.com/nodegit/nodegit/pull/426) ([tbranyen](https://github.com/tbranyen)) + +- Attempt to fix Windows file locking bug [\#425](https://github.com/nodegit/nodegit/pull/425) ([tbranyen](https://github.com/tbranyen)) + +- Fix seg faults [\#424](https://github.com/nodegit/nodegit/pull/424) ([johnhaley81](https://github.com/johnhaley81)) + +- Clean up the persisting of props [\#423](https://github.com/nodegit/nodegit/pull/423) ([johnhaley81](https://github.com/johnhaley81)) + +- Fix indexEntry construction and blobFromBuffer [\#422](https://github.com/nodegit/nodegit/pull/422) ([orderedlist](https://github.com/orderedlist)) + +- Allow for saving of props to an object [\#421](https://github.com/nodegit/nodegit/pull/421) ([johnhaley81](https://github.com/johnhaley81)) + +- Fixes segfault issue recorded in \#406 [\#419](https://github.com/nodegit/nodegit/pull/419) ([tbranyen](https://github.com/tbranyen)) + +- Update jsdoc and ignore some methods [\#418](https://github.com/nodegit/nodegit/pull/418) ([orderedlist](https://github.com/orderedlist)) + +- Fix callbacks with just return value and single payload [\#416](https://github.com/nodegit/nodegit/pull/416) ([johnhaley81](https://github.com/johnhaley81)) + +- Add `git\_reset` and `git\_reset\_default` [\#415](https://github.com/nodegit/nodegit/pull/415) ([johnhaley81](https://github.com/johnhaley81)) + +- Enable `git\_index\_remove\_all` and `git\_index\_update\_all` [\#414](https://github.com/nodegit/nodegit/pull/414) ([johnhaley81](https://github.com/johnhaley81)) + +- Added code for `git\_strarray` and enabled `git\_index\_add\_all` [\#413](https://github.com/nodegit/nodegit/pull/413) ([johnhaley81](https://github.com/johnhaley81)) + +- Tree Entry getBlob\(\) should also support the callback pattern. [\#405](https://github.com/nodegit/nodegit/pull/405) ([jeffwilcox](https://github.com/jeffwilcox)) + +- Tree Entry getBlob\(\) should also support the callback pattern. [\#404](https://github.com/nodegit/nodegit/pull/404) ([jeffwilcox](https://github.com/jeffwilcox)) + +- Adds in git\_checkout\_tree [\#402](https://github.com/nodegit/nodegit/pull/402) ([tbranyen](https://github.com/tbranyen)) + +- Made changes to the README [\#399](https://github.com/nodegit/nodegit/pull/399) ([tbranyen](https://github.com/tbranyen)) + +- Expose gc so all tests run in CI [\#398](https://github.com/nodegit/nodegit/pull/398) ([tbranyen](https://github.com/tbranyen)) + +- One more dependency update [\#397](https://github.com/nodegit/nodegit/pull/397) ([maxkorp](https://github.com/maxkorp)) + +- Update moar dependencies. [\#396](https://github.com/nodegit/nodegit/pull/396) ([maxkorp](https://github.com/maxkorp)) + +- Updated most dependencies to latest versions [\#394](https://github.com/nodegit/nodegit/pull/394) ([johnhaley81](https://github.com/johnhaley81)) + +- Index diffing [\#392](https://github.com/nodegit/nodegit/pull/392) ([orderedlist](https://github.com/orderedlist)) + +- Update to libgit2 v0.22.1 [\#390](https://github.com/nodegit/nodegit/pull/390) ([johnhaley81](https://github.com/johnhaley81)) + +- Fix test issues [\#388](https://github.com/nodegit/nodegit/pull/388) ([maxkorp](https://github.com/maxkorp)) + +- Fix building when a space is in the path [\#387](https://github.com/nodegit/nodegit/pull/387) ([billt2006](https://github.com/billt2006)) + +- General maintenance [\#386](https://github.com/nodegit/nodegit/pull/386) ([maxkorp](https://github.com/maxkorp)) + +- Add 2 convenience methods to revwalk [\#384](https://github.com/nodegit/nodegit/pull/384) ([maxkorp](https://github.com/maxkorp)) + +- Make all cred generators sync. [\#377](https://github.com/nodegit/nodegit/pull/377) ([maxkorp](https://github.com/maxkorp)) + +- Plaintext credential not async [\#375](https://github.com/nodegit/nodegit/pull/375) ([mbleigh](https://github.com/mbleigh)) + +- Status and StatusList [\#374](https://github.com/nodegit/nodegit/pull/374) ([orderedlist](https://github.com/orderedlist)) + +- Fix the package scripts [\#373](https://github.com/nodegit/nodegit/pull/373) ([maxkorp](https://github.com/maxkorp)) + +- Removes Node 0.11 testing completely [\#371](https://github.com/nodegit/nodegit/pull/371) ([tbranyen](https://github.com/tbranyen)) + +- Allow null trees on Diff.treeToTree [\#370](https://github.com/nodegit/nodegit/pull/370) ([orderedlist](https://github.com/orderedlist)) + +- Atom shell support [\#369](https://github.com/nodegit/nodegit/pull/369) ([maxkorp](https://github.com/maxkorp)) + +- `Checkout.head` initializes options if none are passed [\#367](https://github.com/nodegit/nodegit/pull/367) ([johnhaley81](https://github.com/johnhaley81)) + +- INCLUDE\_UNTRACKED option not working for diffs [\#366](https://github.com/nodegit/nodegit/pull/366) ([kmctown](https://github.com/kmctown)) + +- Updated fs-extra to 0.15.0 [\#363](https://github.com/nodegit/nodegit/pull/363) ([johnhaley81](https://github.com/johnhaley81)) + +- update to libgit2 v0.21.5 [\#362](https://github.com/nodegit/nodegit/pull/362) ([maxkorp](https://github.com/maxkorp)) + +- Make remote\#download async [\#326](https://github.com/nodegit/nodegit/pull/326) ([tbranyen](https://github.com/tbranyen)) + +- Enable transfer progress [\#325](https://github.com/nodegit/nodegit/pull/325) ([tbranyen](https://github.com/tbranyen)) + +## [v0.2.7](https://github.com/nodegit/nodegit/tree/v0.2.7) (2015-01-21) + +[Full Changelog](https://github.com/nodegit/nodegit/compare/v0.2.6...v0.2.7) + +## [v0.2.6](https://github.com/nodegit/nodegit/tree/v0.2.6) (2015-01-20) + +[Full Changelog](https://github.com/nodegit/nodegit/compare/v0.2.5...v0.2.6) + +**Merged pull requests:** + +- \[WIP\] Added in some diff functions from libgit2 [\#348](https://github.com/nodegit/nodegit/pull/348) ([johnhaley81](https://github.com/johnhaley81)) + +## [v0.2.5](https://github.com/nodegit/nodegit/tree/v0.2.5) (2015-01-20) + +[Full Changelog](https://github.com/nodegit/nodegit/compare/v0.2.4...v0.2.5) + +**Closed issues:** + +- Lookup a non existent commit crashes the process. [\#353](https://github.com/nodegit/nodegit/issues/353) + +- Why node-git uses 90% rotated hexagon? [\#344](https://github.com/nodegit/nodegit/issues/344) + +- Needed pull example or help with code [\#341](https://github.com/nodegit/nodegit/issues/341) + +- Can't require nodegit without building it explicitly [\#340](https://github.com/nodegit/nodegit/issues/340) + +- Can't build for node-webkit [\#335](https://github.com/nodegit/nodegit/issues/335) + +- Error when creating a new ssh key during credential handshake. [\#333](https://github.com/nodegit/nodegit/issues/333) + +- Tracking down bugs [\#331](https://github.com/nodegit/nodegit/issues/331) + +- Document possible values of CloneOptions [\#330](https://github.com/nodegit/nodegit/issues/330) + +- Require generating error [\#329](https://github.com/nodegit/nodegit/issues/329) + +- Failed getting Banner [\#328](https://github.com/nodegit/nodegit/issues/328) + +- Documentation broken [\#327](https://github.com/nodegit/nodegit/issues/327) + +- Fetch doesn't seem to work with https urls. [\#322](https://github.com/nodegit/nodegit/issues/322) + +- `git diff --cached --name-only` [\#183](https://github.com/nodegit/nodegit/issues/183) + +- git status [\#170](https://github.com/nodegit/nodegit/issues/170) + +**Merged pull requests:** + +- Refactor installation and publication [\#359](https://github.com/nodegit/nodegit/pull/359) ([maxkorp](https://github.com/maxkorp)) + +- Lint examples [\#358](https://github.com/nodegit/nodegit/pull/358) ([maxkorp](https://github.com/maxkorp)) + +- Commit.getParents working with merge commits [\#357](https://github.com/nodegit/nodegit/pull/357) ([bjornarg](https://github.com/bjornarg)) + +- Fixed a typo in the debug build instruction. [\#356](https://github.com/nodegit/nodegit/pull/356) ([mcollina](https://github.com/mcollina)) + +- Added a null check on freeing the raw object [\#354](https://github.com/nodegit/nodegit/pull/354) ([johnhaley81](https://github.com/johnhaley81)) + +- \[WIP\] Attempt at fixing appveyor [\#352](https://github.com/nodegit/nodegit/pull/352) ([johnhaley81](https://github.com/johnhaley81)) + +- Updated to nan 1.5.0 and fixed build errors [\#351](https://github.com/nodegit/nodegit/pull/351) ([johnhaley81](https://github.com/johnhaley81)) + +- WIP: Refactor publishing [\#350](https://github.com/nodegit/nodegit/pull/350) ([maxkorp](https://github.com/maxkorp)) + +- Added debug build instructions. [\#349](https://github.com/nodegit/nodegit/pull/349) ([mcollina](https://github.com/mcollina)) + +- Added checkout head method and tests [\#347](https://github.com/nodegit/nodegit/pull/347) ([johnhaley81](https://github.com/johnhaley81)) + +- bump devDependencies [\#346](https://github.com/nodegit/nodegit/pull/346) ([PeterDaveHello](https://github.com/PeterDaveHello)) + +- Update dependency node-pre-gyp to ~0.6 [\#345](https://github.com/nodegit/nodegit/pull/345) ([PeterDaveHello](https://github.com/PeterDaveHello)) + +- Update dependency fs-extra to ~0.14.0 [\#343](https://github.com/nodegit/nodegit/pull/343) ([PeterDaveHello](https://github.com/PeterDaveHello)) + +- Add Dependency badge in readme [\#342](https://github.com/nodegit/nodegit/pull/342) ([PeterDaveHello](https://github.com/PeterDaveHello)) + +- Fixed promise chain on install [\#339](https://github.com/nodegit/nodegit/pull/339) ([johnhaley81](https://github.com/johnhaley81)) + +- Do not double free during callbacks. [\#338](https://github.com/nodegit/nodegit/pull/338) ([mcollina](https://github.com/mcollina)) + +- Use svg instead of png to get better image quality [\#337](https://github.com/nodegit/nodegit/pull/337) ([PeterDaveHello](https://github.com/PeterDaveHello)) + +- Update to libgit 0.21.4 [\#336](https://github.com/nodegit/nodegit/pull/336) ([johnhaley81](https://github.com/johnhaley81)) + +- Fix issue 333 [\#334](https://github.com/nodegit/nodegit/pull/334) ([johnhaley81](https://github.com/johnhaley81)) + +- Update appveyor.yml to remove project id [\#324](https://github.com/nodegit/nodegit/pull/324) ([vladikoff](https://github.com/vladikoff)) + +- moving some deps to devdeps [\#320](https://github.com/nodegit/nodegit/pull/320) ([maxkorp](https://github.com/maxkorp)) + +## [v0.2.4](https://github.com/nodegit/nodegit/tree/v0.2.4) (2014-12-05) + +[Full Changelog](https://github.com/nodegit/nodegit/compare/v0.2.3...v0.2.4) + +**Closed issues:** + +- Fetch does not really fetch [\#314](https://github.com/nodegit/nodegit/issues/314) + +- Generate Missing Tests - Unable [\#313](https://github.com/nodegit/nodegit/issues/313) + +- Unable to get reference for HEAD [\#311](https://github.com/nodegit/nodegit/issues/311) + +- nodegit.Signature.now broken [\#306](https://github.com/nodegit/nodegit/issues/306) + +- current branch [\#305](https://github.com/nodegit/nodegit/issues/305) + +- Don't require json output for production [\#302](https://github.com/nodegit/nodegit/issues/302) + +- Module fails to load [\#299](https://github.com/nodegit/nodegit/issues/299) + +- How to list all tags? [\#298](https://github.com/nodegit/nodegit/issues/298) + +- Building for ARM [\#292](https://github.com/nodegit/nodegit/issues/292) + +- Next release checklist [\#256](https://github.com/nodegit/nodegit/issues/256) + +- CI issues [\#202](https://github.com/nodegit/nodegit/issues/202) + +- Variable names in the Docs? [\#157](https://github.com/nodegit/nodegit/issues/157) + +**Merged pull requests:** + +- Fixed fetch to be async and use callbacks [\#319](https://github.com/nodegit/nodegit/pull/319) ([johnhaley81](https://github.com/johnhaley81)) + +- Make contributing.md generic and add testing.md [\#318](https://github.com/nodegit/nodegit/pull/318) ([maxkorp](https://github.com/maxkorp)) + +- Fix repo init ext [\#317](https://github.com/nodegit/nodegit/pull/317) ([maxkorp](https://github.com/maxkorp)) + +- Fix 313 generate scripts [\#315](https://github.com/nodegit/nodegit/pull/315) ([xinUmbralis](https://github.com/xinUmbralis)) + +- Fix \#311 [\#312](https://github.com/nodegit/nodegit/pull/312) ([johnhaley81](https://github.com/johnhaley81)) + +- Fix publishing [\#310](https://github.com/nodegit/nodegit/pull/310) ([maxkorp](https://github.com/maxkorp)) + +- detect node-webkit and build with nw-gyp [\#309](https://github.com/nodegit/nodegit/pull/309) ([maxkorp](https://github.com/maxkorp)) + +- fix signature.now and add signature tests [\#308](https://github.com/nodegit/nodegit/pull/308) ([maxkorp](https://github.com/maxkorp)) + +- Add a Gitter chat badge to README.md [\#304](https://github.com/nodegit/nodegit/pull/304) ([gitter-badger](https://github.com/gitter-badger)) + +- move nodegit.js to a template to remove idefs dependency [\#303](https://github.com/nodegit/nodegit/pull/303) ([maxkorp](https://github.com/maxkorp)) + +- Fixed tag list and added a test for it [\#300](https://github.com/nodegit/nodegit/pull/300) ([johnhaley81](https://github.com/johnhaley81)) + +- Convenience methods [\#297](https://github.com/nodegit/nodegit/pull/297) ([johnhaley81](https://github.com/johnhaley81)) + +- Clean up the contents of the generate folder [\#296](https://github.com/nodegit/nodegit/pull/296) ([maxkorp](https://github.com/maxkorp)) + +- Styling [\#295](https://github.com/nodegit/nodegit/pull/295) ([maxkorp](https://github.com/maxkorp)) + +## [v0.2.3](https://github.com/nodegit/nodegit/tree/v0.2.3) (2014-11-25) + +[Full Changelog](https://github.com/nodegit/nodegit/compare/v0.2.2...v0.2.3) + +## [v0.2.2](https://github.com/nodegit/nodegit/tree/v0.2.2) (2014-11-25) + +[Full Changelog](https://github.com/nodegit/nodegit/compare/v0.2.1...v0.2.2) + +**Merged pull requests:** + +- Moved some dependencies around to help the generate not fail [\#294](https://github.com/nodegit/nodegit/pull/294) ([johnhaley81](https://github.com/johnhaley81)) + +## [v0.2.1](https://github.com/nodegit/nodegit/tree/v0.2.1) (2014-11-25) + +[Full Changelog](https://github.com/nodegit/nodegit/compare/v0.2.0...v0.2.1) + +**Merged pull requests:** + +- Rewrite installer [\#293](https://github.com/nodegit/nodegit/pull/293) ([johnhaley81](https://github.com/johnhaley81)) + +## [v0.2.0](https://github.com/nodegit/nodegit/tree/v0.2.0) (2014-11-25) + +[Full Changelog](https://github.com/nodegit/nodegit/compare/v0.1.4...v0.2.0) + +**Closed issues:** + +- Find some way to automatically generate a list of missing tests. [\#272](https://github.com/nodegit/nodegit/issues/272) + +- libgit2 creation methods have name collisions with internal V8 functions [\#271](https://github.com/nodegit/nodegit/issues/271) + +- Enums are still being manually assigned in javascript [\#268](https://github.com/nodegit/nodegit/issues/268) + +- We're using too many promise libraries [\#264](https://github.com/nodegit/nodegit/issues/264) + +- unable to resolve symbolic references [\#262](https://github.com/nodegit/nodegit/issues/262) + +- nodegit installation falls back when Python install dir contains spaces [\#261](https://github.com/nodegit/nodegit/issues/261) + +- Probe features [\#245](https://github.com/nodegit/nodegit/issues/245) + +- require\('path'\).Repo.open\(...\) returns {} [\#241](https://github.com/nodegit/nodegit/issues/241) + +- Refactoring how internal C objects are stored in V8 and passed to JS [\#240](https://github.com/nodegit/nodegit/issues/240) + +- RevWalk malloc error [\#239](https://github.com/nodegit/nodegit/issues/239) + +- OS X tests in Travis-CI [\#237](https://github.com/nodegit/nodegit/issues/237) + +- Fix RevWalk tests [\#236](https://github.com/nodegit/nodegit/issues/236) + +- Simple clone fails. [\#231](https://github.com/nodegit/nodegit/issues/231) + +- Create templates for remaining src and include files [\#230](https://github.com/nodegit/nodegit/issues/230) + +- Error: SSL is not supported by this copy of libgit2. [\#228](https://github.com/nodegit/nodegit/issues/228) + +- error while install nodegit latest version 0.1.4 [\#225](https://github.com/nodegit/nodegit/issues/225) + +- error while install nodegit latest version 0.1.4 [\#224](https://github.com/nodegit/nodegit/issues/224) + +- Did getReferences dissapear? [\#223](https://github.com/nodegit/nodegit/issues/223) + +- How to get UNIX file attributes? [\#222](https://github.com/nodegit/nodegit/issues/222) + +- How to get mtime for TreeEntry/file? [\#221](https://github.com/nodegit/nodegit/issues/221) + +- Commit only if there is changes [\#219](https://github.com/nodegit/nodegit/issues/219) + +- Again for \#147 [\#218](https://github.com/nodegit/nodegit/issues/218) + +- Update documentation on nodegit.org [\#217](https://github.com/nodegit/nodegit/issues/217) + +- Can you provide the prebuilt binaries on S3? [\#216](https://github.com/nodegit/nodegit/issues/216) + +- Stable = bump to 1.0 [\#215](https://github.com/nodegit/nodegit/issues/215) + +- How can I push a commit? [\#214](https://github.com/nodegit/nodegit/issues/214) + +- "Error: Reference 'refs/heads/master' not found " when create commit in a empty repo [\#213](https://github.com/nodegit/nodegit/issues/213) + +- Example on nodegit.com homepage is invalid [\#211](https://github.com/nodegit/nodegit/issues/211) + +- tree.diffWorkDir deprecated? [\#209](https://github.com/nodegit/nodegit/issues/209) + +- Abort on getRemotes [\#201](https://github.com/nodegit/nodegit/issues/201) + +- Generic Logging/Tracing mechanism [\#199](https://github.com/nodegit/nodegit/issues/199) + +- Repo\#openIndex missing [\#197](https://github.com/nodegit/nodegit/issues/197) + +- Documentation on http://www.nodegit.org/ out of date [\#196](https://github.com/nodegit/nodegit/issues/196) + +- Remove extern "C" with 0.21 bump [\#193](https://github.com/nodegit/nodegit/issues/193) + +- CloneOptions documentation lacking [\#192](https://github.com/nodegit/nodegit/issues/192) + +- Getting the HEAD commit SHA [\#191](https://github.com/nodegit/nodegit/issues/191) + +- Webpage examples are not up to date [\#190](https://github.com/nodegit/nodegit/issues/190) + +- Automatically generate structs from types array [\#187](https://github.com/nodegit/nodegit/issues/187) + +- Adding a new file always returns the same SHA. [\#185](https://github.com/nodegit/nodegit/issues/185) + +- Current Travis passes with fallback binary. [\#182](https://github.com/nodegit/nodegit/issues/182) + +- Error: connect ETIMEDOUT during install [\#179](https://github.com/nodegit/nodegit/issues/179) + +- TODO [\#177](https://github.com/nodegit/nodegit/issues/177) + +- Notes [\#176](https://github.com/nodegit/nodegit/issues/176) + +- How to create a branch [\#174](https://github.com/nodegit/nodegit/issues/174) + +- `p-\>index\_map.data' failed [\#172](https://github.com/nodegit/nodegit/issues/172) + +- Integration improvements. [\#171](https://github.com/nodegit/nodegit/issues/171) + +- invalid ELF header from build/Release/nodegit.node [\#167](https://github.com/nodegit/nodegit/issues/167) + +- Removing generated source. [\#165](https://github.com/nodegit/nodegit/issues/165) + +- using newer libgit2 version [\#164](https://github.com/nodegit/nodegit/issues/164) + +- Generating tests for bindings. [\#163](https://github.com/nodegit/nodegit/issues/163) + +- Streams? [\#161](https://github.com/nodegit/nodegit/issues/161) + +- Unfortunately GitHub decided to go their own way :-/ [\#160](https://github.com/nodegit/nodegit/issues/160) + +- Separate additional meta data from JSON. [\#152](https://github.com/nodegit/nodegit/issues/152) + +- Git Pull [\#151](https://github.com/nodegit/nodegit/issues/151) + +- branch.cc missing from binding.gyp [\#149](https://github.com/nodegit/nodegit/issues/149) + +- numDeltasOfType is a static method not on the prototype [\#148](https://github.com/nodegit/nodegit/issues/148) + +- Not sure how this happen [\#147](https://github.com/nodegit/nodegit/issues/147) + +- Emscripten binding templates. [\#142](https://github.com/nodegit/nodegit/issues/142) + +- git+ssh transport support [\#136](https://github.com/nodegit/nodegit/issues/136) + +- Support for git\_merge [\#133](https://github.com/nodegit/nodegit/issues/133) + +- Random segfault in kh\_get\_off [\#132](https://github.com/nodegit/nodegit/issues/132) + +- Unexpected HTTP status code: 401 [\#130](https://github.com/nodegit/nodegit/issues/130) + +- Commit\#messageEncoding triggers a segmentation fault [\#129](https://github.com/nodegit/nodegit/issues/129) + +- Passing CloneOptions [\#127](https://github.com/nodegit/nodegit/issues/127) + +- Commit.getDiff\(\) fails for first commit [\#125](https://github.com/nodegit/nodegit/issues/125) + +- Adding directories [\#121](https://github.com/nodegit/nodegit/issues/121) + +- checkout head and update working tree [\#114](https://github.com/nodegit/nodegit/issues/114) + +- Index add cacheinfo [\#111](https://github.com/nodegit/nodegit/issues/111) + +- Remote.prototype.pushUrl\(\) Segmentation fault: 11 and Remote.prototype.setPushUrl\(url\) not working ? [\#109](https://github.com/nodegit/nodegit/issues/109) + +- Set working tree [\#93](https://github.com/nodegit/nodegit/issues/93) + +**Merged pull requests:** + +- add history.md and update readme [\#291](https://github.com/nodegit/nodegit/pull/291) ([maxkorp](https://github.com/maxkorp)) + +- Added tests for commit [\#290](https://github.com/nodegit/nodegit/pull/290) ([nkt](https://github.com/nkt)) + +- Added editor config [\#289](https://github.com/nodegit/nodegit/pull/289) ([nkt](https://github.com/nkt)) + +- \[WIP\] Push example [\#288](https://github.com/nodegit/nodegit/pull/288) ([johnhaley81](https://github.com/johnhaley81)) + +- \[WIP\] Better installation flow [\#287](https://github.com/nodegit/nodegit/pull/287) ([tbranyen](https://github.com/tbranyen)) + +- Merge methods and tests and examples [\#286](https://github.com/nodegit/nodegit/pull/286) ([maxkorp](https://github.com/maxkorp)) + +- Add details-for-tree-entry [\#285](https://github.com/nodegit/nodegit/pull/285) ([johnhaley81](https://github.com/johnhaley81)) + +- Add repo init example [\#284](https://github.com/nodegit/nodegit/pull/284) ([maxkorp](https://github.com/maxkorp)) + +- update add-and-commit example to include new paths [\#283](https://github.com/nodegit/nodegit/pull/283) ([maxkorp](https://github.com/maxkorp)) + +- General cleanup [\#282](https://github.com/nodegit/nodegit/pull/282) ([maxkorp](https://github.com/maxkorp)) + +- Added osx for testing on Travis [\#281](https://github.com/nodegit/nodegit/pull/281) ([johnhaley81](https://github.com/johnhaley81)) + +- Added " around python path to help fix issues with spaces in path [\#280](https://github.com/nodegit/nodegit/pull/280) ([johnhaley81](https://github.com/johnhaley81)) + +- Tests for branch class [\#279](https://github.com/nodegit/nodegit/pull/279) ([johnhaley81](https://github.com/johnhaley81)) + +- Exposes the NodeGit Promise implementation [\#278](https://github.com/nodegit/nodegit/pull/278) ([tbranyen](https://github.com/tbranyen)) + +- Fixes incorrect method used in path lookup [\#277](https://github.com/nodegit/nodegit/pull/277) ([tbranyen](https://github.com/tbranyen)) + +- \[WIP\] Update examples [\#276](https://github.com/nodegit/nodegit/pull/276) ([johnhaley81](https://github.com/johnhaley81)) + +- Added script to generate missing tests [\#274](https://github.com/nodegit/nodegit/pull/274) ([johnhaley81](https://github.com/johnhaley81)) + +- Rename new [\#273](https://github.com/nodegit/nodegit/pull/273) ([maxkorp](https://github.com/maxkorp)) + +- MSBUILD doesn't allow an array of size 0 [\#270](https://github.com/nodegit/nodegit/pull/270) ([johnhaley81](https://github.com/johnhaley81)) + +- \[WIP\] generate enum definitions [\#269](https://github.com/nodegit/nodegit/pull/269) ([maxkorp](https://github.com/maxkorp)) + +- add Refs.nameToId and test [\#267](https://github.com/nodegit/nodegit/pull/267) ([maxkorp](https://github.com/maxkorp)) + +- voidcheck string pointers and reenable attr test [\#266](https://github.com/nodegit/nodegit/pull/266) ([maxkorp](https://github.com/maxkorp)) + +- require --documentation flag to include text in idefs [\#265](https://github.com/nodegit/nodegit/pull/265) ([maxkorp](https://github.com/maxkorp)) + +- This is a test [\#263](https://github.com/nodegit/nodegit/pull/263) ([johnhaley81](https://github.com/johnhaley81)) + +- Added ability for callbacks to poll promises for fulfillment value [\#260](https://github.com/nodegit/nodegit/pull/260) ([johnhaley81](https://github.com/johnhaley81)) + +- Generate nodegit from libgit2 docs and refactor descriptor [\#259](https://github.com/nodegit/nodegit/pull/259) ([johnhaley81](https://github.com/johnhaley81)) + +- Fix revwalk tests [\#258](https://github.com/nodegit/nodegit/pull/258) ([maxkorp](https://github.com/maxkorp)) + +- Bump to latest libgit2 [\#257](https://github.com/nodegit/nodegit/pull/257) ([tbranyen](https://github.com/tbranyen)) + +- Added status methods [\#255](https://github.com/nodegit/nodegit/pull/255) ([tbranyen](https://github.com/tbranyen)) + +- Use Start-Process to start pageant.exe [\#254](https://github.com/nodegit/nodegit/pull/254) ([FeodorFitsner](https://github.com/FeodorFitsner)) + +- Adds in git\_index\_add and GitIndexInfo struct [\#253](https://github.com/nodegit/nodegit/pull/253) ([tbranyen](https://github.com/tbranyen)) + +- Adds in a broken unit test for \#109 [\#252](https://github.com/nodegit/nodegit/pull/252) ([tbranyen](https://github.com/tbranyen)) + +- Added more git\_cred methods [\#251](https://github.com/nodegit/nodegit/pull/251) ([johnhaley81](https://github.com/johnhaley81)) + +- Refactor classes [\#250](https://github.com/nodegit/nodegit/pull/250) ([maxkorp](https://github.com/maxkorp)) + +- Remove openssl [\#249](https://github.com/nodegit/nodegit/pull/249) ([tbranyen](https://github.com/tbranyen)) + +- Update Readme, to improve example code [\#248](https://github.com/nodegit/nodegit/pull/248) ([nmn](https://github.com/nmn)) + +- \[TEST\] Appveyor agent [\#247](https://github.com/nodegit/nodegit/pull/247) ([tbranyen](https://github.com/tbranyen)) + +- Refactor classes [\#246](https://github.com/nodegit/nodegit/pull/246) ([maxkorp](https://github.com/maxkorp)) + +- Buf methods [\#244](https://github.com/nodegit/nodegit/pull/244) ([tbranyen](https://github.com/tbranyen)) + +- Branch methods [\#243](https://github.com/nodegit/nodegit/pull/243) ([tbranyen](https://github.com/tbranyen)) + +- Blame methods [\#242](https://github.com/nodegit/nodegit/pull/242) ([tbranyen](https://github.com/tbranyen)) + +- Enable multios [\#238](https://github.com/nodegit/nodegit/pull/238) ([maxkorp](https://github.com/maxkorp)) + +- Add revwalk.hide and revwalk.simplifyFirstParent [\#235](https://github.com/nodegit/nodegit/pull/235) ([tbranyen](https://github.com/tbranyen)) + +- Add revwalk.hide and revwalk.simplifyFirstParent [\#234](https://github.com/nodegit/nodegit/pull/234) ([orderedlist](https://github.com/orderedlist)) + +- Moved wrapper/copy out of include/src [\#233](https://github.com/nodegit/nodegit/pull/233) ([johnhaley81](https://github.com/johnhaley81)) + +- Removed ejs dependency [\#232](https://github.com/nodegit/nodegit/pull/232) ([johnhaley81](https://github.com/johnhaley81)) + +- Bump to latest libgit2 [\#229](https://github.com/nodegit/nodegit/pull/229) ([tbranyen](https://github.com/tbranyen)) + +- WIP: Refactor source generation templates from EJS to Combyne [\#227](https://github.com/nodegit/nodegit/pull/227) ([tbranyen](https://github.com/tbranyen)) + +- Test fixes [\#226](https://github.com/nodegit/nodegit/pull/226) ([johnhaley81](https://github.com/johnhaley81)) + +- Get HEAD SHA [\#210](https://github.com/nodegit/nodegit/pull/210) ([tbranyen](https://github.com/tbranyen)) + +- Started working on initializing a repo with init options [\#208](https://github.com/nodegit/nodegit/pull/208) ([tbranyen](https://github.com/tbranyen)) + +- Added new methods in checkout and repository [\#207](https://github.com/nodegit/nodegit/pull/207) ([tbranyen](https://github.com/tbranyen)) + +- Added additional remote methods [\#206](https://github.com/nodegit/nodegit/pull/206) ([tbranyen](https://github.com/tbranyen)) + +- Added git\_remote\_url and git\_remote\_load [\#205](https://github.com/nodegit/nodegit/pull/205) ([tbranyen](https://github.com/tbranyen)) + +- Add in remote listing support and test [\#204](https://github.com/nodegit/nodegit/pull/204) ([tbranyen](https://github.com/tbranyen)) + +- Attr methods [\#203](https://github.com/nodegit/nodegit/pull/203) ([tbranyen](https://github.com/tbranyen)) + +- Support latest libgit2 v0.21.0 [\#200](https://github.com/nodegit/nodegit/pull/200) ([tbranyen](https://github.com/tbranyen)) + +- Add Repo.openIndex [\#198](https://github.com/nodegit/nodegit/pull/198) ([tbranyen](https://github.com/tbranyen)) + +- Clone methods [\#195](https://github.com/nodegit/nodegit/pull/195) ([tbranyen](https://github.com/tbranyen)) + +- Remove all unused vendor directories [\#194](https://github.com/nodegit/nodegit/pull/194) ([tbranyen](https://github.com/tbranyen)) + +- \[WIP\] Mocha integration [\#189](https://github.com/nodegit/nodegit/pull/189) ([tbranyen](https://github.com/tbranyen)) + +- Auto gen structs [\#188](https://github.com/nodegit/nodegit/pull/188) ([tbranyen](https://github.com/tbranyen)) + +- Add in support for repository init ext [\#186](https://github.com/nodegit/nodegit/pull/186) ([tbranyen](https://github.com/tbranyen)) + +- moved libgit2 gyp to separate dir [\#184](https://github.com/nodegit/nodegit/pull/184) ([deepak1556](https://github.com/deepak1556)) + +- Remove all generated source code. [\#181](https://github.com/nodegit/nodegit/pull/181) ([tbranyen](https://github.com/tbranyen)) + +- Better installation flow for developing. [\#180](https://github.com/nodegit/nodegit/pull/180) ([tbranyen](https://github.com/tbranyen)) + +- \[Experimental\] Emscripten fun. [\#168](https://github.com/nodegit/nodegit/pull/168) ([tbranyen](https://github.com/tbranyen)) + +- \[WIP\] Descriptor refactor. [\#162](https://github.com/nodegit/nodegit/pull/162) ([tbranyen](https://github.com/tbranyen)) + +- Enable promises. [\#153](https://github.com/nodegit/nodegit/pull/153) ([tbranyen](https://github.com/tbranyen)) + +## [v0.1.4](https://github.com/nodegit/nodegit/tree/v0.1.4) (2014-06-13) + +[Full Changelog](https://github.com/nodegit/nodegit/compare/v0.1.3...v0.1.4) + +**Closed issues:** + +- Redis Backend [\#173](https://github.com/nodegit/nodegit/issues/173) + +- using "Branch" object results in "undefined" error =\> branch.cc missing from binding.gyp? [\#166](https://github.com/nodegit/nodegit/issues/166) + +- Feature: Compatibility with node \>=v0.11.13 [\#159](https://github.com/nodegit/nodegit/issues/159) + +- Windows: Failure on install [\#158](https://github.com/nodegit/nodegit/issues/158) + +- Can't install v0.1.2 under OSX [\#155](https://github.com/nodegit/nodegit/issues/155) + +- Logo for project [\#69](https://github.com/nodegit/nodegit/issues/69) + +**Merged pull requests:** + +- \[WIP\] Prebuilt binaries. [\#178](https://github.com/nodegit/nodegit/pull/178) ([tbranyen](https://github.com/tbranyen)) + +- NodeJS v0.11.13 compatibility [\#175](https://github.com/nodegit/nodegit/pull/175) ([3y3](https://github.com/3y3)) + +- Fixed: "ReferenceError: error is not defined" [\#169](https://github.com/nodegit/nodegit/pull/169) ([danyshaanan](https://github.com/danyshaanan)) + +## [v0.1.3](https://github.com/nodegit/nodegit/tree/v0.1.3) (2014-05-02) + +[Full Changelog](https://github.com/nodegit/nodegit/compare/v0.1.2...v0.1.3) + +**Closed issues:** + +- Fix AppVeyor. [\#154](https://github.com/nodegit/nodegit/issues/154) + +**Merged pull requests:** + +- Fix erroneous OS detection for installation in OS X. [\#156](https://github.com/nodegit/nodegit/pull/156) ([tbranyen](https://github.com/tbranyen)) + +## [v0.1.2](https://github.com/nodegit/nodegit/tree/v0.1.2) (2014-05-02) + +[Full Changelog](https://github.com/nodegit/nodegit/compare/v0.1.1...v0.1.2) + +**Closed issues:** + +- gyp ERR cannot find -lgit2 [\#150](https://github.com/nodegit/nodegit/issues/150) + +- Read file from git server [\#145](https://github.com/nodegit/nodegit/issues/145) + +- "emulate git log" example error [\#144](https://github.com/nodegit/nodegit/issues/144) + +- repo.workdir\(\) crashes \(SIGSEGV\) on a bare repo [\#128](https://github.com/nodegit/nodegit/issues/128) + +- How to create Branch using the API? [\#124](https://github.com/nodegit/nodegit/issues/124) + +- 'npm run-script gen && npm install' on Ubuntu 13.04 [\#122](https://github.com/nodegit/nodegit/issues/122) + +- Error while installing Nodegit 0.1.0 [\#120](https://github.com/nodegit/nodegit/issues/120) + +- Question: How would I implement the equivalent of `git status`? [\#117](https://github.com/nodegit/nodegit/issues/117) + +- Sync versions of all the methods [\#115](https://github.com/nodegit/nodegit/issues/115) + +- Tick version \# [\#107](https://github.com/nodegit/nodegit/issues/107) + +- Windows support [\#71](https://github.com/nodegit/nodegit/issues/71) + +- Create test for history with merge commits [\#64](https://github.com/nodegit/nodegit/issues/64) + +**Merged pull requests:** + +- Fixed OSX Directions [\#143](https://github.com/nodegit/nodegit/pull/143) ([nickpoorman](https://github.com/nickpoorman)) + +- Add ubuntu lib dependencies to the readme [\#141](https://github.com/nodegit/nodegit/pull/141) ([bigthyme](https://github.com/bigthyme)) + +- WIP New installer. [\#140](https://github.com/nodegit/nodegit/pull/140) ([tbranyen](https://github.com/tbranyen)) + +## [v0.1.1](https://github.com/nodegit/nodegit/tree/v0.1.1) (2014-03-23) + +[Full Changelog](https://github.com/nodegit/nodegit/compare/v0.1.0...v0.1.1) + +**Closed issues:** + +- Misleading Readme [\#138](https://github.com/nodegit/nodegit/issues/138) + +- Cannot find module './build/Debug/nodegit' [\#137](https://github.com/nodegit/nodegit/issues/137) + +- Support for Node 0.11+ [\#134](https://github.com/nodegit/nodegit/issues/134) + +- installer cant seem to find python [\#126](https://github.com/nodegit/nodegit/issues/126) + +- Cannot build when parent directory contains space\(s\) [\#123](https://github.com/nodegit/nodegit/issues/123) + +- question: how cvv8 is used? [\#118](https://github.com/nodegit/nodegit/issues/118) + +- question: gen.js does not generate wrapper.h and wrapper.cc [\#116](https://github.com/nodegit/nodegit/issues/116) + +- tree.diffIndex: pointer being freed was not allocated [\#112](https://github.com/nodegit/nodegit/issues/112) + +- Use as a dependency of another node project? [\#110](https://github.com/nodegit/nodegit/issues/110) + +- Segmentation faults with concurrent access? [\#104](https://github.com/nodegit/nodegit/issues/104) + +- tree.diffWorkDir [\#101](https://github.com/nodegit/nodegit/issues/101) + +- getReference passes unexpected object into callback [\#98](https://github.com/nodegit/nodegit/issues/98) + +- index.removeByPath stops execution [\#97](https://github.com/nodegit/nodegit/issues/97) + +- Missing example: commit to a local repo \(i.e. git add, git commit\) [\#96](https://github.com/nodegit/nodegit/issues/96) + +- Get contents of index entry? [\#94](https://github.com/nodegit/nodegit/issues/94) + +- Failure to Build nodegit at Commit 0aa9a3c120 on OS X 10.6.8 [\#92](https://github.com/nodegit/nodegit/issues/92) + +- TypeError: Cannot call method 'clone' of undefined [\#91](https://github.com/nodegit/nodegit/issues/91) + +- missing cstring [\#88](https://github.com/nodegit/nodegit/issues/88) + +- Memory management for the codegen `wip` branch [\#84](https://github.com/nodegit/nodegit/issues/84) + +- Installing fails - can't find vendor/libgit2/build [\#80](https://github.com/nodegit/nodegit/issues/80) + +- Improving JavaScript API [\#73](https://github.com/nodegit/nodegit/issues/73) + +- Using code-generation to generate [\#70](https://github.com/nodegit/nodegit/issues/70) + +**Merged pull requests:** + +- Fix and improve testing. [\#139](https://github.com/nodegit/nodegit/pull/139) ([tbranyen](https://github.com/tbranyen)) + +- Support for Node 0.11+ [\#135](https://github.com/nodegit/nodegit/pull/135) ([pierreinglebert](https://github.com/pierreinglebert)) + +- Fixed the error message to pass test. [\#119](https://github.com/nodegit/nodegit/pull/119) ([tbranyen](https://github.com/tbranyen)) + +- Added git\_diff\_delta\_dup to git\_diff\_get\_patch to fix a memory issue whe... [\#113](https://github.com/nodegit/nodegit/pull/113) ([kmctown](https://github.com/kmctown)) + +- Try requiring build/Debug/nodegit if build/Release/nodegit wasn't found. [\#108](https://github.com/nodegit/nodegit/pull/108) ([papandreou](https://github.com/papandreou)) + +- Updated v0.18.0.json to make the index and DiffOptions arguments in Inde... [\#106](https://github.com/nodegit/nodegit/pull/106) ([kmctown](https://github.com/kmctown)) + +- Duplicate git\_error struct before passing it on [\#105](https://github.com/nodegit/nodegit/pull/105) ([papandreou](https://github.com/papandreou)) + +- Changed v0.18.0.json so diffWorkDir DiffOptions argument is optional. Ad... [\#103](https://github.com/nodegit/nodegit/pull/103) ([kmctown](https://github.com/kmctown)) + +- Reviewd and fixed examples [\#102](https://github.com/nodegit/nodegit/pull/102) ([micha149](https://github.com/micha149)) + +- cmake 2.8 is required to build nodegit [\#100](https://github.com/nodegit/nodegit/pull/100) ([dcolens](https://github.com/dcolens)) + +- new add-and-commit.js and remove-and-commit.js examples [\#99](https://github.com/nodegit/nodegit/pull/99) ([dcolens](https://github.com/dcolens)) + +- Add missing fields to index entry [\#95](https://github.com/nodegit/nodegit/pull/95) ([papandreou](https://github.com/papandreou)) + +- Made the tests pass and making each test self-contained [\#90](https://github.com/nodegit/nodegit/pull/90) ([FrozenCow](https://github.com/FrozenCow)) + +- Fixed compile error: memcpy not defined [\#89](https://github.com/nodegit/nodegit/pull/89) ([FrozenCow](https://github.com/FrozenCow)) + +- Add system dependencies for OSX install [\#82](https://github.com/nodegit/nodegit/pull/82) ([philschatz](https://github.com/philschatz)) + +## [v0.1.0](https://github.com/nodegit/nodegit/tree/v0.1.0) (2013-09-07) + +[Full Changelog](https://github.com/nodegit/nodegit/compare/v0.0.79...v0.1.0) + +**Closed issues:** + +- The api in README is incorrect [\#87](https://github.com/nodegit/nodegit/issues/87) + +- message\_encoding in documentation for Repo.createCommit [\#86](https://github.com/nodegit/nodegit/issues/86) + +- How to retrieve blob with binary content? [\#83](https://github.com/nodegit/nodegit/issues/83) + +- Incorrect commit oid's when aggregated from commit.history\(\) [\#81](https://github.com/nodegit/nodegit/issues/81) + +- How do you list branches in repo? [\#76](https://github.com/nodegit/nodegit/issues/76) + +- License? [\#74](https://github.com/nodegit/nodegit/issues/74) + +- Nested walks scatter memory and cause SEGFAULTS [\#72](https://github.com/nodegit/nodegit/issues/72) + +- Why is new git.Oid\(\).fromString\(\) etc. async? [\#68](https://github.com/nodegit/nodegit/issues/68) + +- feature request: Provide fileMode / getType method on tree entries [\#67](https://github.com/nodegit/nodegit/issues/67) + +- Document DiffList [\#66](https://github.com/nodegit/nodegit/issues/66) + +- Implement query-like access to repo content [\#61](https://github.com/nodegit/nodegit/issues/61) + +- Tags [\#58](https://github.com/nodegit/nodegit/issues/58) + +- Procedure for moving development to nodegit/nodegit [\#55](https://github.com/nodegit/nodegit/issues/55) + +- cloning or updating repositories? [\#50](https://github.com/nodegit/nodegit/issues/50) + +- Cannot install on OSX [\#49](https://github.com/nodegit/nodegit/issues/49) + +- Add file to repo [\#45](https://github.com/nodegit/nodegit/issues/45) + +**Merged pull requests:** + +- Fixed TreeBuilder.write's missing repo argument to match its documentation [\#85](https://github.com/nodegit/nodegit/pull/85) ([FrozenCow](https://github.com/FrozenCow)) + +- Codegen [\#79](https://github.com/nodegit/nodegit/pull/79) ([nkallen](https://github.com/nkallen)) + +- Codegen [\#78](https://github.com/nodegit/nodegit/pull/78) ([nkallen](https://github.com/nkallen)) + +- Codegen [\#77](https://github.com/nodegit/nodegit/pull/77) ([nkallen](https://github.com/nkallen)) + +- Updated LICENSE to MIT [\#75](https://github.com/nodegit/nodegit/pull/75) ([tbranyen](https://github.com/tbranyen)) + +## [v0.0.79](https://github.com/nodegit/nodegit/tree/v0.0.79) (2013-04-05) + +[Full Changelog](https://github.com/nodegit/nodegit/compare/v0.0.778...v0.0.79) + +**Closed issues:** + +- Un-chain async example on github pages [\#65](https://github.com/nodegit/nodegit/issues/65) + +- Clarify commit.history documentation [\#63](https://github.com/nodegit/nodegit/issues/63) + +- Make commit.time pass Date object [\#62](https://github.com/nodegit/nodegit/issues/62) + +- Python error on installing nodegit 0.0.77 [\#59](https://github.com/nodegit/nodegit/issues/59) + +## [v0.0.778](https://github.com/nodegit/nodegit/tree/v0.0.778) (2013-03-26) + +[Full Changelog](https://github.com/nodegit/nodegit/compare/v0.0.77...v0.0.778) + +**Merged pull requests:** + +- See issue \#59 [\#60](https://github.com/nodegit/nodegit/pull/60) ([dctr](https://github.com/dctr)) + +## [v0.0.77](https://github.com/nodegit/nodegit/tree/v0.0.77) (2013-03-24) + +[Full Changelog](https://github.com/nodegit/nodegit/compare/v0.0.76...v0.0.77) + +## [v0.0.76](https://github.com/nodegit/nodegit/tree/v0.0.76) (2013-03-24) + +[Full Changelog](https://github.com/nodegit/nodegit/compare/v0.0.75...v0.0.76) + +## [v0.0.75](https://github.com/nodegit/nodegit/tree/v0.0.75) (2013-03-24) + +[Full Changelog](https://github.com/nodegit/nodegit/compare/v0.0.74...v0.0.75) + +**Closed issues:** + +- incomplete error reporting [\#57](https://github.com/nodegit/nodegit/issues/57) + +- Segmentation Fault in raw-commit.js [\#56](https://github.com/nodegit/nodegit/issues/56) + +- Another Mac OSX install fail [\#53](https://github.com/nodegit/nodegit/issues/53) + +- unit tests broken in travis-ci [\#52](https://github.com/nodegit/nodegit/issues/52) + +- "Image not found" with require\("nodegit"\) on Mac OS X [\#51](https://github.com/nodegit/nodegit/issues/51) + +- Cannot Compile on 0.8.\* [\#47](https://github.com/nodegit/nodegit/issues/47) + +- No suitable image found. [\#46](https://github.com/nodegit/nodegit/issues/46) + +- Fails to require module on latest node version [\#43](https://github.com/nodegit/nodegit/issues/43) + +- Compilation error node 0.6.1 [\#32](https://github.com/nodegit/nodegit/issues/32) + +- commit.history work like slice [\#17](https://github.com/nodegit/nodegit/issues/17) + +- Sync and Async methods [\#16](https://github.com/nodegit/nodegit/issues/16) + +- Comment all code methods [\#1](https://github.com/nodegit/nodegit/issues/1) + +## [v0.0.74](https://github.com/nodegit/nodegit/tree/v0.0.74) (2013-03-21) + +[Full Changelog](https://github.com/nodegit/nodegit/compare/v0.0.73...v0.0.74) + +## [v0.0.73](https://github.com/nodegit/nodegit/tree/v0.0.73) (2013-03-21) + +[Full Changelog](https://github.com/nodegit/nodegit/compare/v0.0.72...v0.0.73) + +**Closed issues:** + +- pass through python flag to node-gyp [\#54](https://github.com/nodegit/nodegit/issues/54) + +- update package.json [\#28](https://github.com/nodegit/nodegit/issues/28) + +- Rewrite Notes [\#27](https://github.com/nodegit/nodegit/issues/27) + +- Tree each method is synchronous [\#15](https://github.com/nodegit/nodegit/issues/15) + +## [v0.0.72](https://github.com/nodegit/nodegit/tree/v0.0.72) (2013-03-06) + +[Full Changelog](https://github.com/nodegit/nodegit/compare/v0.0.71...v0.0.72) + +## [v0.0.71](https://github.com/nodegit/nodegit/tree/v0.0.71) (2013-03-06) + +[Full Changelog](https://github.com/nodegit/nodegit/compare/v0.0.6...v0.0.71) + +**Closed issues:** + +- Unable to load shared library [\#39](https://github.com/nodegit/nodegit/issues/39) + +- Expand Convenience Unit Tests [\#38](https://github.com/nodegit/nodegit/issues/38) + +- repo has no method 'branch' [\#35](https://github.com/nodegit/nodegit/issues/35) + +- update for node 0.5.9 [\#29](https://github.com/nodegit/nodegit/issues/29) + +- Issue with errors [\#23](https://github.com/nodegit/nodegit/issues/23) + +**Merged pull requests:** + +- Converted from eio\_custom to uv\_queue\_work [\#48](https://github.com/nodegit/nodegit/pull/48) ([faceleg](https://github.com/faceleg)) + +- Fix Load-Order Bug [\#44](https://github.com/nodegit/nodegit/pull/44) ([fatlotus](https://github.com/fatlotus)) + +- Update documented commands needed to run tests [\#42](https://github.com/nodegit/nodegit/pull/42) ([shama](https://github.com/shama)) + +- Fix typo in README.md [\#41](https://github.com/nodegit/nodegit/pull/41) ([Skomski](https://github.com/Skomski)) + +- Issue 35: repo has no method 'branch' [\#40](https://github.com/nodegit/nodegit/pull/40) ([cholin](https://github.com/cholin)) + +- Refactor [\#37](https://github.com/nodegit/nodegit/pull/37) ([mmalecki](https://github.com/mmalecki)) + +- Refactor [\#36](https://github.com/nodegit/nodegit/pull/36) ([mmalecki](https://github.com/mmalecki)) + +- Removed references to node\_events.h [\#31](https://github.com/nodegit/nodegit/pull/31) ([alexkwolfe](https://github.com/alexkwolfe)) + +- Updates for node 0.5.9 \(fixed Issue \#29\) [\#30](https://github.com/nodegit/nodegit/pull/30) ([tojocky](https://github.com/tojocky)) + +- Error constants added [\#25](https://github.com/nodegit/nodegit/pull/25) ([milani](https://github.com/milani)) + +## [v0.0.6](https://github.com/nodegit/nodegit/tree/v0.0.6) (2011-12-19) + +[Full Changelog](https://github.com/nodegit/nodegit/compare/v0.0.4...v0.0.6) + +**Closed issues:** + +- commit event with undefined commit [\#26](https://github.com/nodegit/nodegit/issues/26) + +- Convenience methods are not convenience! [\#24](https://github.com/nodegit/nodegit/issues/24) + +**Merged pull requests:** + +- Node 0.6x fixes [\#34](https://github.com/nodegit/nodegit/pull/34) ([moneal](https://github.com/moneal)) + +- Updates for node 0.6x [\#33](https://github.com/nodegit/nodegit/pull/33) ([moneal](https://github.com/moneal)) + +## [v0.0.4](https://github.com/nodegit/nodegit/tree/v0.0.4) (2011-05-14) + +[Full Changelog](https://github.com/nodegit/nodegit/compare/v0.0.3...v0.0.4) + +**Closed issues:** + +- repo.branch fails on empty repo [\#22](https://github.com/nodegit/nodegit/issues/22) + +- example/convenience-repo.js errors [\#21](https://github.com/nodegit/nodegit/issues/21) + +- Use new Error when throwing exceptions [\#20](https://github.com/nodegit/nodegit/issues/20) + +- Scope.close when handlescope is used [\#19](https://github.com/nodegit/nodegit/issues/19) + +- Branch history each method is asynchronous [\#11](https://github.com/nodegit/nodegit/issues/11) + +## [v0.0.3](https://github.com/nodegit/nodegit/tree/v0.0.3) (2011-04-13) + +[Full Changelog](https://github.com/nodegit/nodegit/compare/v0.0.2...v0.0.3) + +**Closed issues:** + +- error handling [\#18](https://github.com/nodegit/nodegit/issues/18) + +- nodegit namespace [\#14](https://github.com/nodegit/nodegit/issues/14) + +- Rename all classes to have Git prefix [\#13](https://github.com/nodegit/nodegit/issues/13) + +- Windows link issue [\#12](https://github.com/nodegit/nodegit/issues/12) + +## [v0.0.2](https://github.com/nodegit/nodegit/tree/v0.0.2) (2011-03-14) + +[Full Changelog](https://github.com/nodegit/nodegit/compare/v0.0.1...v0.0.2) + +## [v0.0.1](https://github.com/nodegit/nodegit/tree/v0.0.1) (2011-03-10) + + + +\* *This Change Log was automatically generated by [github_changelog_generator](https://github.com/skywinder/Github-Changelog-Generator)* \ No newline at end of file From ebc175bacdb995c5151abecaec24df7d00d7187e Mon Sep 17 00:00:00 2001 From: billt2006 Date: Mon, 16 Mar 2015 23:11:27 -0400 Subject: [PATCH 02/60] Fix gitter badge for npm --- README.md | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/README.md b/README.md index 142085be1..42e47abd4 100644 --- a/README.md +++ b/README.md @@ -33,8 +33,7 @@ NodeGit ## Have a problem? Come chat with us! ## -[![Gitter](http://www.nodegit.org/img/gitterbadge.svg)] -(https://gitter.im/nodegit/nodegit) +[![Gitter](http://www.nodegit.org/img/gitterbadge.svg)](https://gitter.im/nodegit/nodegit) ## Maintained by ## Tim Branyen [@tbranyen](http://twitter.com/tbranyen), From c006787680b27fedeabc88834422003f355010ba Mon Sep 17 00:00:00 2001 From: John Haley Date: Wed, 18 Mar 2015 21:13:57 -0700 Subject: [PATCH 03/60] Enable `git_stash_foreach` --- generate/input/callbacks.json | 2 +- generate/input/descriptor.json | 5 ++++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/generate/input/callbacks.json b/generate/input/callbacks.json index 46dbb4654..7beccbd54 100644 --- a/generate/input/callbacks.json +++ b/generate/input/callbacks.json @@ -424,7 +424,7 @@ }, { "name": "stash_id", - "cType": "const int *" + "cType": "const git_oid *" }, { "name": "payload", diff --git a/generate/input/descriptor.json b/generate/input/descriptor.json index bb3a71a28..693739068 100644 --- a/generate/input/descriptor.json +++ b/generate/input/descriptor.json @@ -1564,7 +1564,10 @@ "stash": { "functions": { "git_stash_foreach": { - "ignore": true + "isAsync": true, + "return": { + "isErrorCode": true + } } } }, From 89af8028ba61552f4f7f6ac89c55e41baf21f992 Mon Sep 17 00:00:00 2001 From: John Haley Date: Thu, 19 Mar 2015 08:35:30 -0700 Subject: [PATCH 04/60] Add `git_stash_save` to the supplement --- generate/input/libgit2-supplement.json | 33 ++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) diff --git a/generate/input/libgit2-supplement.json b/generate/input/libgit2-supplement.json index f1553d80a..3940797b1 100644 --- a/generate/input/libgit2-supplement.json +++ b/generate/input/libgit2-supplement.json @@ -141,6 +141,36 @@ "type": "int" }, "group": "reset" + }, + "git_stash_save": { + "type": "function", + "file": "stash.h", + "args": [ + { + "name": "out", + "type": "git_oid *" + }, + { + "name": "repo", + "type": "git_repository *" + }, + { + "name": "stasher", + "type": "const git_signature *" + }, + { + "name": "message", + "type": "const char *" + }, + { + "name": "flags", + "type": "unsigned int" + } + ], + "return": { + "type": "int" + }, + "group": "stash" } }, "groups": [ @@ -470,6 +500,9 @@ "groups": { "reset": [ "git_reset" + ], + "stash": [ + "git_stash_save" ] } } From c1fe4f4acb4388c7c05a381865ecd18710de6fdf Mon Sep 17 00:00:00 2001 From: Tim Branyen Date: Thu, 19 Mar 2015 19:47:49 -0400 Subject: [PATCH 05/60] Adds in C++ code coverage and joined JS This commit adds in CPP code coverage via GCC and GCOV. That lcov data is then joined to the JavaScript istanbul output and then generated into unified test/coverage/report and test/merged.cov reports. --- .travis.yml | 3 ++- package.json | 7 +++++-- test/index.js | 28 +++++++++++++--------------- 3 files changed, 20 insertions(+), 18 deletions(-) diff --git a/.travis.yml b/.travis.yml index eccf39e5b..88dd9c5c9 100644 --- a/.travis.yml +++ b/.travis.yml @@ -16,8 +16,9 @@ before_install: - if [ $TRAVIS_OS_NAME == "linux" ]; then sudo add-apt-repository -y ppa:ubuntu-toolchain-r/test; sudo apt-get -qq update; - sudo apt-get -qq install g++-4.8; + sudo apt-get -qq install g++-4.8 lcov; export CXX='g++-4.8'; + export GYP_DEFINES='coverage=1'; fi - "export JOBS=4" - BUILD_ONLY=true npm install diff --git a/package.json b/package.json index 534cd06fc..5bebdba7e 100644 --- a/package.json +++ b/package.json @@ -66,6 +66,7 @@ "istanbul": "^0.3.5", "js-beautify": "^1.5.4", "jshint": "^2.6.0", + "lcov-result-merger": "^1.0.2", "lodash": "^3.1.0", "mocha": "~2.1.0", "nan": "^1.7.0", @@ -81,10 +82,12 @@ }, "scripts": { "lint": "jshint lib test/tests examples lifecycleScripts", - "cov": "node --expose-gc test", + "cppcov": "mkdir -p test/coverage/cpp && lcov --capture --directory build/Release/obj.target/nodegit/src --output-file test/coverage/cpp/lcov.info", + "mergecov": "lcov-result-merger 'test/**/*.info' 'test/coverage/merged.lcov' && genhtml test/coverage/merged.lcov --output-directory test/coverage/report", + "cov": "npm run cppcov && npm run mergecov", "mocha": "mocha test/runner test/tests", "mochaDebug": "mocha --debug-brk test/runner test/tests", - "test": "npm run lint && npm run cov", + "test": "npm run lint && node --expose-gc test", "generateJson": "node generate/scripts/generateJson", "generateNativeCode": "node generate/scripts/generateNativeCode", "generateMissingTests": "node generate/scripts/generateMissingTests", diff --git a/test/index.js b/test/index.js index 7e39d5a26..b80f79749 100644 --- a/test/index.js +++ b/test/index.js @@ -1,20 +1,18 @@ var fork = require("child_process").fork; var path = require("path"); -var args = [ - "cover", - process.platform != "win32" ? - "_mocha" : - "../node_modules/mocha/bin/_mocha", - "--", - "runner", - "tests", - "--report=lcov", +var bin = "./node_modules/.bin/istanbul"; +var cov = "cover --report=lcov _mocha --".split(" "); + +if (process.platform === 'win32') { + bin = "./node_modules/mocha/bin/mocha"; + cov = []; +} + +var args = cov.concat([ + "test/runner", + "test/tests", "--expose-gc" -]; +]); -fork("../node_modules/istanbul/lib/cli.js", args, { - cwd: __dirname -}).on("close", function(code) { - process.exit(code); -}); +fork(bin, args, { cwd: path.join(__dirname, "../") }).on("close", process.exit); From 89b541fc1f03e0b31acfc0cc9eda6a1ad431999f Mon Sep 17 00:00:00 2001 From: Tim Branyen Date: Thu, 19 Mar 2015 21:32:02 -0400 Subject: [PATCH 06/60] Run coverage in CI and add Coveralls badge --- .travis.yml | 20 +++++++++++++++----- README.md | 4 ++++ generate/templates/templates/binding.gyp | 17 +++++++++++++++++ lifecycleScripts/install.js | 3 ++- package.json | 2 ++ test/index.js | 2 +- 6 files changed, 41 insertions(+), 7 deletions(-) diff --git a/.travis.yml b/.travis.yml index 88dd9c5c9..46b8c43c9 100644 --- a/.travis.yml +++ b/.travis.yml @@ -16,11 +16,16 @@ before_install: - if [ $TRAVIS_OS_NAME == "linux" ]; then sudo add-apt-repository -y ppa:ubuntu-toolchain-r/test; sudo apt-get -qq update; - sudo apt-get -qq install g++-4.8 lcov; - export CXX='g++-4.8'; - export GYP_DEFINES='coverage=1'; + sudo apt-get -qq install gcc-4.8 g++-4.8 lcov; + sudo rm /usr/bin/gcov /usr/bin/g++; + sudo ln -s /usr/bin/gcov-4.8 /usr/bin/gcov; + sudo ln -s /usr/bin/g++-4.8 /usr/bin/g++; + export CC="gcc-4.8"; + export CXX="g++-4.8"; + export GYP_DEFINES="coverage=1"; + export JOBS=4; + sudo update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-4.8 90; fi - - "export JOBS=4" - BUILD_ONLY=true npm install # This is a random private key used purely for testing. before_script: @@ -41,7 +46,12 @@ branches: os: - linux - osx -script: npm test +script: + - if [ $TRAVIS_OS_NAME == "linux" ] && [ $NODE_VERSION == "0.12" ]; then + npm test && npm run cov && npm run coveralls; + else + npm test; + fi notifications: slack: secure: KglNSqZiid9YudCwkPFDh+sZfW5BwFlM70y67E4peHwwlbbV1sSBPHcs74ZHP/lqgEZ4hMv4N2NI58oYFD5/1a+tKIQP1TkdIMuq4j2LXheuirA2HDcydOVrsC8kRx5XFGKdVRg/uyX2dlRHcOWFhxrS6yc6IxtxYWlRTD2SmEc= diff --git a/README.md b/README.md index 42e47abd4..76fe9c3e3 100644 --- a/README.md +++ b/README.md @@ -9,6 +9,7 @@ NodeGit Linux OS X Windows + Coverage Dependencies @@ -20,6 +21,9 @@ NodeGit + + Coverage Status + diff --git a/generate/templates/templates/binding.gyp b/generate/templates/templates/binding.gyp index 06adb5307..ed13a69f8 100644 --- a/generate/templates/templates/binding.gyp +++ b/generate/templates/templates/binding.gyp @@ -9,6 +9,10 @@ "<(module_root_dir)/vendor/libgit2.gyp:libgit2" ], + "variables": { + "coverage%": 0 + }, + "sources": [ "src/nodegit.cc", "src/wrapper.cc", @@ -32,6 +36,19 @@ ], "conditions": [ + [ + "coverage==1", { + "cflags": [ + "-ftest-coverage", + "-fprofile-arcs" + ], + "link_settings": { + "libraries": [ + "-lgcov" + ] + }, + } + ], [ "OS=='mac'", { "xcode_settings": { diff --git a/lifecycleScripts/install.js b/lifecycleScripts/install.js index 9a39e02a2..65b80319b 100644 --- a/lifecycleScripts/install.js +++ b/lifecycleScripts/install.js @@ -86,7 +86,8 @@ function build() { var opts = { cwd: ".", - maxBuffer: Number.MAX_VALUE + maxBuffer: Number.MAX_VALUE, + env: process.env }; var prefix = ""; diff --git a/package.json b/package.json index 5bebdba7e..7deb7bdc2 100644 --- a/package.json +++ b/package.json @@ -63,6 +63,7 @@ }, "devDependencies": { "combyne": "^0.6.5", + "coveralls": "^2.11.2", "istanbul": "^0.3.5", "js-beautify": "^1.5.4", "jshint": "^2.6.0", @@ -82,6 +83,7 @@ }, "scripts": { "lint": "jshint lib test/tests examples lifecycleScripts", + "coveralls": "cat ./test/coverage/merged.lcov | coveralls", "cppcov": "mkdir -p test/coverage/cpp && lcov --capture --directory build/Release/obj.target/nodegit/src --output-file test/coverage/cpp/lcov.info", "mergecov": "lcov-result-merger 'test/**/*.info' 'test/coverage/merged.lcov' && genhtml test/coverage/merged.lcov --output-directory test/coverage/report", "cov": "npm run cppcov && npm run mergecov", diff --git a/test/index.js b/test/index.js index b80f79749..bde4d989c 100644 --- a/test/index.js +++ b/test/index.js @@ -2,7 +2,7 @@ var fork = require("child_process").fork; var path = require("path"); var bin = "./node_modules/.bin/istanbul"; -var cov = "cover --report=lcov _mocha --".split(" "); +var cov = "cover --report=lcov --dir=test/coverage/js _mocha --".split(" "); if (process.platform === 'win32') { bin = "./node_modules/mocha/bin/mocha"; From c179e2b133b4e4ba9fdf072b252e36e907a87e12 Mon Sep 17 00:00:00 2001 From: Tim Branyen Date: Fri, 20 Mar 2015 13:10:12 -0400 Subject: [PATCH 07/60] Attempt using iojs first and then try ndoe --- .travis.yml | 22 ++++++++++++++-------- README.md | 4 ++-- package.json | 4 ++-- 3 files changed, 18 insertions(+), 12 deletions(-) diff --git a/.travis.yml b/.travis.yml index 46b8c43c9..426563ef4 100644 --- a/.travis.yml +++ b/.travis.yml @@ -15,16 +15,22 @@ before_install: - nvm use $NODE_VERSION - if [ $TRAVIS_OS_NAME == "linux" ]; then sudo add-apt-repository -y ppa:ubuntu-toolchain-r/test; - sudo apt-get -qq update; - sudo apt-get -qq install gcc-4.8 g++-4.8 lcov; - sudo rm /usr/bin/gcov /usr/bin/g++; - sudo ln -s /usr/bin/gcov-4.8 /usr/bin/gcov; - sudo ln -s /usr/bin/g++-4.8 /usr/bin/g++; - export CC="gcc-4.8"; - export CXX="g++-4.8"; + sudo apt-get update; + sudo apt-get install gcc-4.9 g++-4.9 lcov; + sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-4.9 20; + sudo update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-4.9 20; + sudo update-alternatives --install /usr/bin/gcov gcov /usr/bin/gcov-4.9 20; + sudo update-alternatives --config gcc; + sudo update-alternatives --config g++; + sudo update-alternatives --config gcov; + wget http://downloads.sourceforge.net/ltp/lcov-1.10.tar.gz; + tar xvfz lcov-1.10.tar.gz; + sudo cp -v lcov-1.10/bin/{lcov,genpng,gendesc,genhtml,geninfo} /usr/bin/; + sudo chmod 777 /usr/bin/lcov /usr/bin/genhtml /usr/bin/geninfo /usr/bin/genpng /usg/bin/gendesc; + rm -rf lcov-1.10.tar.gz lcov-1.10; + sudo mv -v `which gcov-4.8` `which gcov`; export GYP_DEFINES="coverage=1"; export JOBS=4; - sudo update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-4.8 90; fi - BUILD_ONLY=true npm install # This is a random private key used purely for testing. diff --git a/README.md b/README.md index 76fe9c3e3..4d4778587 100644 --- a/README.md +++ b/README.md @@ -31,8 +31,6 @@ NodeGit -***NOTE: NodeGit currently does not work with [iojs on windows](https://github.com/rvagg/pangyp/issues/4)*** - **Stable: 0.3.3** ## Have a problem? Come chat with us! ## @@ -63,6 +61,8 @@ dependencies. npm install nodegit ``` +**Note: NodeGit will only work on io.js Windows with [the iojs binary instead of node](https://github.com/rvagg/pangyp/issues/4).** + If you encounter problems while installing, you should try the Building from source instructions below. diff --git a/package.json b/package.json index 7deb7bdc2..7b80c8979 100644 --- a/package.json +++ b/package.json @@ -84,12 +84,12 @@ "scripts": { "lint": "jshint lib test/tests examples lifecycleScripts", "coveralls": "cat ./test/coverage/merged.lcov | coveralls", - "cppcov": "mkdir -p test/coverage/cpp && lcov --capture --directory build/Release/obj.target/nodegit/src --output-file test/coverage/cpp/lcov.info", + "cppcov": "mkdir -p test/coverage/cpp && lcov --gcov-tool $(which gcov) --capture --directory build/Release/obj.target/nodegit/src --output-file test/coverage/cpp/lcov.info", "mergecov": "lcov-result-merger 'test/**/*.info' 'test/coverage/merged.lcov' && genhtml test/coverage/merged.lcov --output-directory test/coverage/report", "cov": "npm run cppcov && npm run mergecov", "mocha": "mocha test/runner test/tests", "mochaDebug": "mocha --debug-brk test/runner test/tests", - "test": "npm run lint && node --expose-gc test", + "test": "npm run lint && iojs --expose-gc test || node --expose-gc test", "generateJson": "node generate/scripts/generateJson", "generateNativeCode": "node generate/scripts/generateNativeCode", "generateMissingTests": "node generate/scripts/generateMissingTests", From a35eeddf22e0d96ded4b766d19e6afb4ef7a29d4 Mon Sep 17 00:00:00 2001 From: Tim Date: Sun, 22 Mar 2015 00:40:05 -0400 Subject: [PATCH 08/60] Only run coverage on our files Elminates nan, gyp, etc from our reports. --- package.json | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/package.json b/package.json index 7b80c8979..7ba398810 100644 --- a/package.json +++ b/package.json @@ -84,9 +84,10 @@ "scripts": { "lint": "jshint lib test/tests examples lifecycleScripts", "coveralls": "cat ./test/coverage/merged.lcov | coveralls", - "cppcov": "mkdir -p test/coverage/cpp && lcov --gcov-tool $(which gcov) --capture --directory build/Release/obj.target/nodegit/src --output-file test/coverage/cpp/lcov.info", + "filtercov": "lcov --extract test/coverage/cpp/lcov_full.info $(pwd)/src/* $(pwd)/src/**/* $(pwd)/include/* $(pwd)/include/**/* --output-file test/coverage/cpp/lcov.info && rm test/coverage/cpp/lcov_full.info", + "cppcov": "mkdir -p test/coverage/cpp && lcov --gcov-tool $(which gcov) --capture --directory build/Release/obj.target/nodegit/src --output-file test/coverage/cpp/lcov_full.info", "mergecov": "lcov-result-merger 'test/**/*.info' 'test/coverage/merged.lcov' && genhtml test/coverage/merged.lcov --output-directory test/coverage/report", - "cov": "npm run cppcov && npm run mergecov", + "cov": "npm run cppcov && npm run filtercov && npm run mergecov", "mocha": "mocha test/runner test/tests", "mochaDebug": "mocha --debug-brk test/runner test/tests", "test": "npm run lint && iojs --expose-gc test || node --expose-gc test", From c7de4121875365b214de44598c8534c64fef34d3 Mon Sep 17 00:00:00 2001 From: Tim Date: Sun, 22 Mar 2015 00:52:48 -0400 Subject: [PATCH 09/60] Remove dead code in copy.cc --- .../templates/manual/src/functions/copy.cc | 36 ------------------- 1 file changed, 36 deletions(-) diff --git a/generate/templates/manual/src/functions/copy.cc b/generate/templates/manual/src/functions/copy.cc index 0effadb2c..a7b59c199 100644 --- a/generate/templates/manual/src/functions/copy.cc +++ b/generate/templates/manual/src/functions/copy.cc @@ -9,39 +9,3 @@ const git_error *git_error_dup(const git_error *arg) { result->message = strdup(arg->message); return result; } - -const git_oid *git_oid_dup(const git_oid *arg) { - git_oid *result = (git_oid *)malloc(sizeof(git_oid)); - git_oid_cpy(result, arg); - return result; -} - -const git_index_entry *git_index_entry_dup(const git_index_entry *arg) { - git_index_entry *result = (git_index_entry *)malloc(sizeof(git_index_entry)); - *result = *arg; - return result; -} - -const git_index_time *git_index_time_dup(const git_index_time *arg) { - git_index_time *result = (git_index_time *)malloc(sizeof(git_index_time)); - *result = (const git_index_time) *arg; - return result; -} - -const git_time *git_time_dup(const git_time *arg) { - git_time *result = (git_time *)malloc(sizeof(git_time)); - *result = *arg; - return result; -} - -const git_diff_delta *git_diff_delta_dup(const git_diff_delta *arg) { - git_diff_delta *result = (git_diff_delta *)malloc(sizeof(git_diff_delta)); - *result = *arg; - return result; -} - -const git_diff_file *git_diff_file_dup(const git_diff_file *arg) { - git_diff_file *result = (git_diff_file *)malloc(sizeof(git_diff_file)); - *result = *arg; - return result; -} From 5c10506ccc7e30412d3f1815b68080fa7549574e Mon Sep 17 00:00:00 2001 From: Tony Gaskell Date: Sun, 22 Mar 2015 01:51:04 -1000 Subject: [PATCH 10/60] Revert "Guide navigation is currently confusing" From 534b4aea926aa91543da3b512c45a54ca5dac11f Mon Sep 17 00:00:00 2001 From: Tony Gaskell Date: Sun, 22 Mar 2015 02:11:38 -1000 Subject: [PATCH 11/60] Add navigation fixes from previous commit See nodegit/nodegit@2fe55cc --- guides/cloning/README.md | 2 +- guides/cloning/gh-two-factor/README.md | 2 +- guides/cloning/ssh-with-agent/README.md | 2 +- guides/install/README.md | 2 +- guides/install/atom-shell/README.md | 2 +- guides/install/from-source/README.md | 4 ++-- guides/install/nw.js/README.md | 2 +- guides/repositories/initializing/README.md | 2 +- 8 files changed, 9 insertions(+), 9 deletions(-) diff --git a/guides/cloning/README.md b/guides/cloning/README.md index e0c94f899..ea648ca29 100644 --- a/guides/cloning/README.md +++ b/guides/cloning/README.md @@ -8,7 +8,7 @@ description: How to clone with HTTP/HTTPS **In order to run examples, you will need to [Install NodeGit](../../install/basics) first.** -[Return to cloning guides](../) +[Return to all guides](../) * * * diff --git a/guides/cloning/gh-two-factor/README.md b/guides/cloning/gh-two-factor/README.md index d07b0efd3..c28b6fe15 100644 --- a/guides/cloning/gh-two-factor/README.md +++ b/guides/cloning/gh-two-factor/README.md @@ -8,7 +8,7 @@ description: How to clone with GitHub Two Factor Authorization **In order to run examples, you will need to [Install NodeGit](../../install/basics) first.** -[Return to cloning guides](../) +[Return to all guides](../../) * * * diff --git a/guides/cloning/ssh-with-agent/README.md b/guides/cloning/ssh-with-agent/README.md index 013f646a8..d6740b2ec 100644 --- a/guides/cloning/ssh-with-agent/README.md +++ b/guides/cloning/ssh-with-agent/README.md @@ -8,7 +8,7 @@ description: How to clone with SSH using an agent **In order to run examples, you will need to [Install NodeGit](../../install/basics) first.** -[Return to cloning guides](../) +[Return to all guides](../../) * * * diff --git a/guides/install/README.md b/guides/install/README.md index f507070ff..1cb727a1d 100644 --- a/guides/install/README.md +++ b/guides/install/README.md @@ -5,7 +5,7 @@ title: Install Basics description: How to install NodeGit --- -[Return to install guides](../) +[Return to all guides](../) * * * diff --git a/guides/install/atom-shell/README.md b/guides/install/atom-shell/README.md index f4078791a..cdf38772e 100644 --- a/guides/install/atom-shell/README.md +++ b/guides/install/atom-shell/README.md @@ -5,7 +5,7 @@ title: Atom Shell description: How to install NodeGit with Atom Shell --- -[Return to install guides](../) +[Return to all guides](../../) * * * diff --git a/guides/install/from-source/README.md b/guides/install/from-source/README.md index b0679fc1b..c85e2e3fa 100644 --- a/guides/install/from-source/README.md +++ b/guides/install/from-source/README.md @@ -5,7 +5,7 @@ title: From source description: How to build NodeGit from source --- -[Return to install guides](../) +[Return to all guides](../../) * * * @@ -54,7 +54,7 @@ Note that GCC/G++ 4.7+ are required, as the library makes use of some c++11 std - [Download and install Python 2](https://www.python.org/download/windows). - [Download and install VS Community](https://www.visualstudio.com/products/visual-studio-community-vs). -You may have to add a build flag to the installation process to successfully install. +You may have to add a build flag to the installation process to successfully install. Try first without, if the build fails, try again with the flag. *Allegedly the order in which you install Visual Studio could trigger this error.* diff --git a/guides/install/nw.js/README.md b/guides/install/nw.js/README.md index 49809fad2..5eb978b3a 100644 --- a/guides/install/nw.js/README.md +++ b/guides/install/nw.js/README.md @@ -5,7 +5,7 @@ title: NW.js description: How to install NodeGit with NW.js --- -[Return to install guides](../) +[Return to all guides](../../) * * * diff --git a/guides/repositories/initializing/README.md b/guides/repositories/initializing/README.md index 8b8ad0f71..facd76afd 100644 --- a/guides/repositories/initializing/README.md +++ b/guides/repositories/initializing/README.md @@ -8,7 +8,7 @@ description: How to initialize a repository **In order to run examples, you will need to [Install NodeGit](../../install/basics) first.** -[Return to repository guides](../) +[Return to all guides](../../) * * * From c7b4f7a4fba5e1e26ed166787de1e210328b4915 Mon Sep 17 00:00:00 2001 From: Tony Gaskell Date: Sun, 22 Mar 2015 02:20:26 -1000 Subject: [PATCH 12/60] Fix basic install links on guide pages --- guides/cloning/README.md | 2 +- guides/cloning/gh-two-factor/README.md | 2 +- guides/cloning/ssh-with-agent/README.md | 2 +- guides/repositories/README.md | 2 +- guides/repositories/initializing/README.md | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/guides/cloning/README.md b/guides/cloning/README.md index ea648ca29..f5bf53333 100644 --- a/guides/cloning/README.md +++ b/guides/cloning/README.md @@ -5,7 +5,7 @@ title: HTTP/HTTPS Guide description: How to clone with HTTP/HTTPS --- -**In order to run examples, you will need to [Install NodeGit](../../install/basics) +**In order to run examples, you will need to [Install NodeGit](../install) first.** [Return to all guides](../) diff --git a/guides/cloning/gh-two-factor/README.md b/guides/cloning/gh-two-factor/README.md index c28b6fe15..11f6520fc 100644 --- a/guides/cloning/gh-two-factor/README.md +++ b/guides/cloning/gh-two-factor/README.md @@ -5,7 +5,7 @@ title: GitHub Two Factor Auth Guide description: How to clone with GitHub Two Factor Authorization --- -**In order to run examples, you will need to [Install NodeGit](../../install/basics) +**In order to run examples, you will need to [Install NodeGit](../../install) first.** [Return to all guides](../../) diff --git a/guides/cloning/ssh-with-agent/README.md b/guides/cloning/ssh-with-agent/README.md index d6740b2ec..9cc111069 100644 --- a/guides/cloning/ssh-with-agent/README.md +++ b/guides/cloning/ssh-with-agent/README.md @@ -5,7 +5,7 @@ title: SSH w/ Agent Guide description: How to clone with SSH using an agent --- -**In order to run examples, you will need to [Install NodeGit](../../install/basics) +**In order to run examples, you will need to [Install NodeGit](../../install) first.** [Return to all guides](../../) diff --git a/guides/repositories/README.md b/guides/repositories/README.md index 429a2ff5d..65cb063c2 100644 --- a/guides/repositories/README.md +++ b/guides/repositories/README.md @@ -5,7 +5,7 @@ title: Opening a Repository description: How to open and free a repository --- -**In order to run examples, you will need to [Install NodeGit](../../install/basics) +**In order to run examples, you will need to [Install NodeGit](../install) first.** [Return to all guides](../) diff --git a/guides/repositories/initializing/README.md b/guides/repositories/initializing/README.md index facd76afd..90e5090d4 100644 --- a/guides/repositories/initializing/README.md +++ b/guides/repositories/initializing/README.md @@ -5,7 +5,7 @@ title: Initializing description: How to initialize a repository --- -**In order to run examples, you will need to [Install NodeGit](../../install/basics) +**In order to run examples, you will need to [Install NodeGit](../../install) first.** [Return to all guides](../../) From f613b52fe6629433c56219e6862c9e3f66b719ff Mon Sep 17 00:00:00 2001 From: Steve Smith Date: Sat, 21 Mar 2015 12:13:03 -0700 Subject: [PATCH 13/60] Checkout branch with tree instead of head Checkout.head futzes with the index, and that's not what we want in a branch checkout --- lib/repository.js | 23 ++++++++++++++--------- test/tests/checkout.js | 16 +++++++++------- 2 files changed, 23 insertions(+), 16 deletions(-) diff --git a/lib/repository.js b/lib/repository.js index 37e9833ff..4da999de1 100644 --- a/lib/repository.js +++ b/lib/repository.js @@ -804,24 +804,29 @@ Repository.prototype.getStatusExt = function(opts) { */ Repository.prototype.checkoutBranch = function(branch, opts) { var repo = this; - + var reference; opts = opts || {}; - opts.checkoutStrategy = opts.checkoutStrategy || Checkout.STRATEGY.SAFE; - + opts.checkoutStrategy = opts.checkoutStrategy || + Checkout.STRATEGY.SAFE_CREATE; return repo.getReference(branch) .then(function(ref) { if (!ref.isBranch()) { return false; } - - var name = ref.name(); - + reference = ref; + return repo.getBranchCommit(ref.name()); + }) + .then(function(commit) { + return commit.getTree(); + }) + .then(function(tree) { + return Checkout.tree(repo, tree, opts); + }) + .then(function() { + var name = reference.name(); return repo.setHead(name, repo.defaultSignature(), "Switch HEAD to " + name); - }) - .then(function() { - return Checkout.head(repo, opts); }); }; diff --git a/test/tests/checkout.js b/test/tests/checkout.js index fbe565125..99c63d35b 100644 --- a/test/tests/checkout.js +++ b/test/tests/checkout.js @@ -83,21 +83,23 @@ describe("Checkout", function() { }); }); - it("can checkout a branch", function() { + it.only("can checkout a branch", function() { var test = this; - return test.repository.checkoutBranch(checkoutBranchName, { - checkoutStrategy: Checkout.STRATEGY.FORCE - }) + return test.repository.checkoutBranch(checkoutBranchName) .then(function() { var packageContent = fse.readFileSync(packageJsonPath, "utf-8"); assert.ok(!~packageContent.indexOf("\"ejs\": \"~1.0.0\",")); }) .then(function() { - return test.repository.checkoutBranch("master", { - checkoutStrategy: Checkout.STRATEGY.FORCE - }); + return test.repository.getStatus(); + }) + .then(function(statuses) { + assert.equal(statuses.length, 0); + }) + .then(function() { + return test.repository.checkoutBranch("master"); }) .then(function() { var packageContent = fse.readFileSync(packageJsonPath, "utf-8"); From a4a4c8b66bac9feba25bd00e3c0c17efc5e4d203 Mon Sep 17 00:00:00 2001 From: Steve Smith Date: Thu, 19 Mar 2015 11:48:48 -0400 Subject: [PATCH 14/60] Properly update the index on Merge FF --- lib/repository.js | 36 ++++++++++++++++++++++++++---------- 1 file changed, 26 insertions(+), 10 deletions(-) diff --git a/lib/repository.js b/lib/repository.js index 4da999de1..64b75d7be 100644 --- a/lib/repository.js +++ b/lib/repository.js @@ -661,15 +661,18 @@ Repository.prototype.mergeBranches = function(to, from, signature) { var repo = this; var fromBranch; var toBranch; + var headCommit; signature = signature || repo.defaultSignature(); return Promise.all([ repo.getBranch(to), - repo.getBranch(from) - ]).then(function(branches) { - toBranch = branches[0]; - fromBranch = branches[1]; + repo.getBranch(from), + repo.getHeadCommit() + ]).then(function(objects) { + toBranch = objects[0]; + fromBranch = objects[1]; + headCommit = objects[2]; return Promise.all([ repo.getBranchCommit(toBranch), @@ -694,13 +697,26 @@ Repository.prototype.mergeBranches = function(to, from, signature) { " to branch " + fromBranch.shorthand(); - return toBranch.setTarget( - fromCommitOid, - signature, - message) + return branchCommits[1].getTree() + .then(function(tree) { + if (headCommit.toString() == toCommitOid) { + // Checkout the tree if we're on the branch + var opts = {checkoutStrategy: NodeGit.Checkout.STRATEGY.SAFE}; + return NodeGit.Checkout.tree(repo, tree, opts); + } else { + // Otherwise, just point the ref + return; + } + }) .then(function() { - return fromCommitOid; - }); + return toBranch.setTarget( + fromCommitOid, + signature, + message) + .then(function() { + return fromCommitOid; + }); + }) } else { // We have to merge. Lets do it! From 5bffb8d629994dabe0dbdaac288ef33c074652bc Mon Sep 17 00:00:00 2001 From: Steve Smith Date: Sat, 21 Mar 2015 12:14:03 -0700 Subject: [PATCH 15/60] Remove only from tests --- test/tests/checkout.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/tests/checkout.js b/test/tests/checkout.js index 99c63d35b..05c3105a9 100644 --- a/test/tests/checkout.js +++ b/test/tests/checkout.js @@ -83,7 +83,7 @@ describe("Checkout", function() { }); }); - it.only("can checkout a branch", function() { + it("can checkout a branch", function() { var test = this; return test.repository.checkoutBranch(checkoutBranchName) From 7775aa70c1dd296996054af71a14b2b50d52c210 Mon Sep 17 00:00:00 2001 From: Steve Smith Date: Sun, 22 Mar 2015 09:26:55 -0700 Subject: [PATCH 16/60] Fast forward checking out the tree instead of the head Don't need to manipulate the index in this scenario --- lib/repository.js | 21 +++++++++------------ test/tests/merge.js | 11 +++++++++++ 2 files changed, 20 insertions(+), 12 deletions(-) diff --git a/lib/repository.js b/lib/repository.js index 64b75d7be..729bb1415 100644 --- a/lib/repository.js +++ b/lib/repository.js @@ -661,24 +661,22 @@ Repository.prototype.mergeBranches = function(to, from, signature) { var repo = this; var fromBranch; var toBranch; - var headCommit; signature = signature || repo.defaultSignature(); return Promise.all([ - repo.getBranch(to), - repo.getBranch(from), - repo.getHeadCommit() + repo.getBranch(to), + repo.getBranch(from) ]).then(function(objects) { toBranch = objects[0]; fromBranch = objects[1]; - headCommit = objects[2]; return Promise.all([ repo.getBranchCommit(toBranch), repo.getBranchCommit(fromBranch) ]); - }).then(function(branchCommits) { + }) + .then(function(branchCommits) { var toCommitOid = branchCommits[0].toString(); var fromCommitOid = branchCommits[1].toString(); @@ -699,13 +697,12 @@ Repository.prototype.mergeBranches = function(to, from, signature) { return branchCommits[1].getTree() .then(function(tree) { - if (headCommit.toString() == toCommitOid) { + if (toBranch.isHead()) { // Checkout the tree if we're on the branch - var opts = {checkoutStrategy: NodeGit.Checkout.STRATEGY.SAFE}; + var opts = { + checkoutStrategy: NodeGit.Checkout.STRATEGY.SAFE_CREATE + }; return NodeGit.Checkout.tree(repo, tree, opts); - } else { - // Otherwise, just point the ref - return; } }) .then(function() { @@ -716,7 +713,7 @@ Repository.prototype.mergeBranches = function(to, from, signature) { .then(function() { return fromCommitOid; }); - }) + }); } else { // We have to merge. Lets do it! diff --git a/test/tests/merge.js b/test/tests/merge.js index 14f4b4a2f..b08de4bc3 100644 --- a/test/tests/merge.js +++ b/test/tests/merge.js @@ -214,6 +214,10 @@ describe("Merge", function() { theirCommit = commit; }); }) + .then(function() { + var opts = {checkoutStrategy: NodeGit.Checkout.STRATEGY.FORCE}; + return repository.checkoutBranch(ourBranchName, opts); + }) .then(function() { return repository.mergeBranches( ourBranchName, @@ -228,6 +232,13 @@ describe("Merge", function() { .then(function(branchCommit) { assert.equal(oid.toString(), branchCommit.toString()); }); + }) + .then(function() { + return repository.getStatus(); + }) + .then(function(statuses) { + // make sure we didn't change the index + assert.equal(statuses.length, 0); }); }); From 9110545074b1e41b70b3bb9807ba3a21847b864b Mon Sep 17 00:00:00 2001 From: Tim Branyen Date: Tue, 24 Mar 2015 13:09:11 -0400 Subject: [PATCH 17/60] Converted create methods to be synchronous Also added in git_packbuilder_new -> Packbuilder.create. --- generate/input/descriptor.json | 10 ++++- lib/index.js | 8 ++-- lib/repository.js | 14 +++---- test/tests/index.js | 2 +- test/tests/packbuilder.js | 25 +++++++++++ test/tests/pathspec.js | 52 ++++++++++------------- test/tests/remote.js | 77 +++++++++++++++------------------- test/tests/repository.js | 12 +++--- 8 files changed, 106 insertions(+), 94 deletions(-) create mode 100644 test/tests/packbuilder.js diff --git a/generate/input/descriptor.json b/generate/input/descriptor.json index bb3a71a28..76fd9a99f 100644 --- a/generate/input/descriptor.json +++ b/generate/input/descriptor.json @@ -1132,7 +1132,7 @@ "ignore": true }, "git_packbuilder_new": { - "ignore": true + "isAsync": false }, "git_packbuilder_set_callbacks": { "ignore": true @@ -1182,6 +1182,9 @@ "functions": { "git_pathspec_match_list_free": { "ignore": true + }, + "git_pathspec_new": { + "isAsync": false } } }, @@ -1306,6 +1309,9 @@ "remote": { "cType": "git_remote", "functions": { + "git_remote_create": { + "isAsync": false + }, "git_remote_connect": { "isAsync": true, "return": { @@ -1596,7 +1602,7 @@ "status_list": { "functions": { "git_status_list_new": { - "isAsync": true, + "isAsync": false, "args": { "opts": { "isOptional": true diff --git a/lib/index.js b/lib/index.js index 75e6f7e6b..f4377cfaf 100644 --- a/lib/index.js +++ b/lib/index.js @@ -31,11 +31,9 @@ Index.prototype.addAll = function(pathspec, flags, matchedCallback) { paths.push(path); }; var idx = this; - return Pathspec.create(pathspec || "*") - .then(function(ps) { - pathspec = ps; - return Status.foreach(repo, statusCB); - }) + var pathspec = Pathspec.create(pathspec || "*"); + + return Status.foreach(repo, statusCB) .then(function() { return paths; }) diff --git a/lib/repository.js b/lib/repository.js index 729bb1415..57191e6d8 100644 --- a/lib/repository.js +++ b/lib/repository.js @@ -798,14 +798,14 @@ Repository.prototype.getStatusExt = function(opts) { }; } - return StatusList.create(this, opts).then(function(list) { - for (var i = 0; i < list.entrycount(); i++) { - var entry = Status.byIndex(list, i); - statuses.push(new StatusFile({entry: entry})); - } + var list = StatusList.create(this, opts); - return statuses; - }); + for (var i = 0; i < list.entrycount(); i++) { + var entry = Status.byIndex(list, i); + statuses.push(new StatusFile({entry: entry})); + } + + return statuses; }; /** diff --git a/test/tests/index.js b/test/tests/index.js index 846fa1e72..f073977eb 100644 --- a/test/tests/index.js +++ b/test/tests/index.js @@ -12,7 +12,7 @@ var writeFile = promisify(function(filename, data, callback) { describe("Index", function() { var NodeGit = require("../../"); var Repository = NodeGit.Repository; - + var reposPath = local("../repos/workdir"); beforeEach(function() { diff --git a/test/tests/packbuilder.js b/test/tests/packbuilder.js new file mode 100644 index 000000000..cfd193238 --- /dev/null +++ b/test/tests/packbuilder.js @@ -0,0 +1,25 @@ +var assert = require("assert"); +var path = require("path"); +var local = path.join.bind(path, __dirname); + +describe("Packbuilder", function() { + var NodeGit = require("../../"); + var Repository = NodeGit.Repository; + var Packbuilder = NodeGit.Packbuilder; + + var reposPath = local("../repos/workdir"); + + beforeEach(function() { + var test = this; + + return Repository.open(reposPath).then(function(repository) { + test.repository = repository; + }); + }); + + it("can be initialized", function() { + var packBuilder = Packbuilder.create(this.repository); + + assert(packBuilder instanceof Packbuilder); + }); +}); diff --git a/test/tests/pathspec.js b/test/tests/pathspec.js index 23a19cb74..051b82027 100644 --- a/test/tests/pathspec.js +++ b/test/tests/pathspec.js @@ -5,46 +5,40 @@ describe("Pathspec", function() { var Pathspec = NodeGit.Pathspec; it("can accept just about anything against a * pathspec", function() { - return Pathspec.create("*") - .then(function(pathspec) { - assert.equal(pathspec.matchesPath(0, "burritoooo"), 1); - assert.equal(pathspec.matchesPath(0, "bob/ted/yoghurt.mp3"), 1); - }); + var pathspec = Pathspec.create("*"); + + assert.equal(pathspec.matchesPath(0, "burritoooo"), 1); + assert.equal(pathspec.matchesPath(0, "bob/ted/yoghurt.mp3"), 1); }); it("can take a * in an array", function() { - return Pathspec.create(["*"]) - .then(function(pathspec) { - assert.equal(pathspec.matchesPath(0, "burritoooo"), 1); - assert.equal(pathspec.matchesPath(0, "bob/ted/yoghurt.mp3"), 1); - }); + var pathspec = Pathspec.create("*"); + + assert.equal(pathspec.matchesPath(0, "burritoooo"), 1); + assert.equal(pathspec.matchesPath(0, "bob/ted/yoghurt.mp3"), 1); }); it("can take a single file", function() { - return Pathspec.create(["myDir/burritoSupreme.mp4"]) - .then(function(pathspec) { - assert.equal(pathspec.matchesPath(0, "myDir/burritoSupreme.mp4"), 1); - assert.equal(pathspec.matchesPath(0, "bob/ted/yoghurt.mp3"), 0); - }); + var pathspec = Pathspec.create(["myDir/burritoSupreme.mp4"]); + + assert.equal(pathspec.matchesPath(0, "myDir/burritoSupreme.mp4"), 1); + assert.equal(pathspec.matchesPath(0, "bob/ted/yoghurt.mp3"), 0); }); it("can take files in an array", function() { - return Pathspec.create(["gwendoline.txt", "sausolito.ogg"]) - .then(function(pathspec) { - assert.equal(pathspec.matchesPath(0, "gwendoline.txt"), 1); - assert.equal(pathspec.matchesPath(0, "sausolito.ogg"), 1); - assert.equal(pathspec.matchesPath(0, "sausolito.txt"), 0); - }); + var pathspec = Pathspec.create(["gwendoline.txt", "sausolito.ogg"]) + + assert.equal(pathspec.matchesPath(0, "gwendoline.txt"), 1); + assert.equal(pathspec.matchesPath(0, "sausolito.ogg"), 1); + assert.equal(pathspec.matchesPath(0, "sausolito.txt"), 0); }); it("can handle dirs", function() { - return Pathspec.create(["myDir/", "bob.js"]) - .then(function(pathspec) { - assert.equal(pathspec.matchesPath(0, "bob.js"), 1); - assert.equal(pathspec.matchesPath(0, "myDir/bob2.js"), 1); - assert.equal(pathspec.matchesPath(0, "bob2.js"), 0); - assert.equal(pathspec.matchesPath(0, "herDir/bob.js"), 0); - }); - }); + var pathspec = Pathspec.create(["myDir/", "bob.js"]) + assert.equal(pathspec.matchesPath(0, "bob.js"), 1); + assert.equal(pathspec.matchesPath(0, "myDir/bob2.js"), 1); + assert.equal(pathspec.matchesPath(0, "bob2.js"), 0); + assert.equal(pathspec.matchesPath(0, "herDir/bob.js"), 0); + }); }); diff --git a/test/tests/remote.js b/test/tests/remote.js index a1a9e8e9d..e2bf2b97a 100644 --- a/test/tests/remote.js +++ b/test/tests/remote.js @@ -53,16 +53,10 @@ describe("Remote", function() { it("can set a remote", function() { var repository = this.repository; - var newRemote; + var remote = Remote.create(repository, "origin1", url); - return Remote.create(repository, "origin1", url) - .then(function(remote) { - newRemote = remote; - return remote.setPushurl("https://google.com/"); - }) - .then(function() { - assert(newRemote.pushurl(), "https://google.com/"); - }); + remote.setPushurl("https://google.com/"); + assert(remote.pushurl(), "https://google.com/"); }); it("can read the remote name", function() { @@ -71,24 +65,20 @@ describe("Remote", function() { it("can create and load a new remote", function() { var repository = this.repository; + var remote = Remote.create(repository, "origin2", url); - return Remote.create(repository, "origin2", url) - .then(function() { - return Remote.lookup(repository, "origin2"); - }) - .then(function(remote) { - assert(remote.url(), url); - }); + return Remote.lookup(repository, "origin2").then(function() { + assert(remote.url(), url); + }); }); it("can delete a remote", function() { var repository = this.repository; + var remote = Remote.create(repository, "origin3", url); - return Remote.create(repository, "origin3", url) - .then(function(remote) { - Remote.delete(repository, "origin3"); - return Remote.lookup(repository, "origin3"); - }) + Remote.delete(repository, "origin3"); + + return Remote.lookup(repository, "origin3") .then(Promise.reject, Promise.resolve); }); @@ -119,31 +109,30 @@ describe("Remote", function() { var repo = this.repository; var wasCalled = false; - return Remote.create(repo, "test2", url2) - .then(function() { - return repo.getRemote("test2"); - }) - .then(function(remote) { - remote.setCallbacks({ - credentials: function(url, userName) { - return NodeGit.Cred.sshKeyFromAgent(userName); - }, - certificateCheck: function() { - return 1; - }, - - transferProgress: function() { - wasCalled = true; - } - }); + var remote = Remote.create(repo, "test2", url2); - return remote.fetch(null, repo.defaultSignature(), null); - }) - .then(function() { - assert.ok(wasCalled); + return repo.getRemote("test2") + .then(function(remote) { + remote.setCallbacks({ + credentials: function(url, userName) { + return NodeGit.Cred.sshKeyFromAgent(userName); + }, + certificateCheck: function() { + return 1; + }, - Remote.delete(repo, "test2"); - }); + transferProgress: function() { + wasCalled = true; + } + }); + + return remote.fetch(null, repo.defaultSignature(), null); + }) + .then(function() { + assert.ok(wasCalled); + + Remote.delete(repo, "test2"); + }); }); it("can fetch from a remote", function() { diff --git a/test/tests/repository.js b/test/tests/repository.js index e82045fd3..42006be03 100644 --- a/test/tests/repository.js +++ b/test/tests/repository.js @@ -120,12 +120,12 @@ describe("Repository", function() { return fse.writeFile(filePath, fileContent) .then(function() { - return repo.getStatusExt().then(function(statuses) { - assert.equal(statuses.length, 1); - assert.equal(statuses[0].path(), fileName); - assert.equal(statuses[0].indexToWorkdir().newFile().path(), fileName); - assert.ok(statuses[0].isNew()); - }); + var statuses = repo.getStatusExt(); + + assert.equal(statuses.length, 1); + assert.equal(statuses[0].path(), fileName); + assert.equal(statuses[0].indexToWorkdir().newFile().path(), fileName); + assert.ok(statuses[0].isNew()); }) .then(function() { return fse.remove(filePath); From 4c14cc1d2abf771c9fb04340ad0749071078c663 Mon Sep 17 00:00:00 2001 From: Tim Branyen Date: Tue, 24 Mar 2015 15:39:01 -0400 Subject: [PATCH 18/60] Fix test grouping and lint issues --- lib/index.js | 4 ++-- package.json | 2 +- test/tests/pathspec.js | 4 ++-- test/tests/remote.js | 4 ++-- 4 files changed, 7 insertions(+), 7 deletions(-) diff --git a/lib/index.js b/lib/index.js index f4377cfaf..a7f41571e 100644 --- a/lib/index.js +++ b/lib/index.js @@ -31,7 +31,7 @@ Index.prototype.addAll = function(pathspec, flags, matchedCallback) { paths.push(path); }; var idx = this; - var pathspec = Pathspec.create(pathspec || "*"); + var ps = Pathspec.create(pathspec || "*"); return Status.foreach(repo, statusCB) .then(function() { @@ -39,7 +39,7 @@ Index.prototype.addAll = function(pathspec, flags, matchedCallback) { }) .then(function(paths) { paths = paths.filter(function(path) { - return !!(pathspec.matchesPath(0, path)); + return !!(ps.matchesPath(0, path)); }); return addAll.call(idx, paths, flags, matchedCallback, null); }); diff --git a/package.json b/package.json index 7ba398810..18a74115b 100644 --- a/package.json +++ b/package.json @@ -90,7 +90,7 @@ "cov": "npm run cppcov && npm run filtercov && npm run mergecov", "mocha": "mocha test/runner test/tests", "mochaDebug": "mocha --debug-brk test/runner test/tests", - "test": "npm run lint && iojs --expose-gc test || node --expose-gc test", + "test": "npm run lint && (iojs --expose-gc test || node --expose-gc test)", "generateJson": "node generate/scripts/generateJson", "generateNativeCode": "node generate/scripts/generateNativeCode", "generateMissingTests": "node generate/scripts/generateMissingTests", diff --git a/test/tests/pathspec.js b/test/tests/pathspec.js index 051b82027..28741b068 100644 --- a/test/tests/pathspec.js +++ b/test/tests/pathspec.js @@ -26,7 +26,7 @@ describe("Pathspec", function() { }); it("can take files in an array", function() { - var pathspec = Pathspec.create(["gwendoline.txt", "sausolito.ogg"]) + var pathspec = Pathspec.create(["gwendoline.txt", "sausolito.ogg"]); assert.equal(pathspec.matchesPath(0, "gwendoline.txt"), 1); assert.equal(pathspec.matchesPath(0, "sausolito.ogg"), 1); @@ -34,7 +34,7 @@ describe("Pathspec", function() { }); it("can handle dirs", function() { - var pathspec = Pathspec.create(["myDir/", "bob.js"]) + var pathspec = Pathspec.create(["myDir/", "bob.js"]); assert.equal(pathspec.matchesPath(0, "bob.js"), 1); assert.equal(pathspec.matchesPath(0, "myDir/bob2.js"), 1); diff --git a/test/tests/remote.js b/test/tests/remote.js index e2bf2b97a..3b24f6a4b 100644 --- a/test/tests/remote.js +++ b/test/tests/remote.js @@ -74,7 +74,7 @@ describe("Remote", function() { it("can delete a remote", function() { var repository = this.repository; - var remote = Remote.create(repository, "origin3", url); + Remote.create(repository, "origin3", url); Remote.delete(repository, "origin3"); @@ -109,7 +109,7 @@ describe("Remote", function() { var repo = this.repository; var wasCalled = false; - var remote = Remote.create(repo, "test2", url2); + Remote.create(repo, "test2", url2); return repo.getRemote("test2") .then(function(remote) { From 2c0b94e5ca3049000c3d01e8a8b7090edbe6f881 Mon Sep 17 00:00:00 2001 From: John Haley Date: Tue, 24 Mar 2015 09:12:39 -0700 Subject: [PATCH 19/60] Fix atom-shell build on windows When compiling against the latest (0.22.1 currently) atom-shell something was defining `HAVE_POLL` which is a linux system header file. This was breaking the atom-shell build on windows. --- vendor/libgit2.gyp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/vendor/libgit2.gyp b/vendor/libgit2.gyp index 0af36d465..afdfc620e 100644 --- a/vendor/libgit2.gyp +++ b/vendor/libgit2.gyp @@ -463,6 +463,9 @@ "libssh2/win32", "libssh2/include" ], + "defines!": [ + "HAVE_POLL" + ], "direct_dependent_settings": { "include_dirs": [ "libssh2/src", From b346a97cc59a6ee63fb8fcf013efd05b0f4d8be7 Mon Sep 17 00:00:00 2001 From: John Haley Date: Thu, 26 Mar 2015 13:17:52 -0700 Subject: [PATCH 20/60] Add `Repository.prototype.fetchheadForeach` and tests --- generate/input/callbacks.json | 8 ++++---- generate/input/descriptor.json | 5 ++++- lib/repository.js | 10 ++++++++++ test/runner.js | 4 +++- test/tests/repository.js | 32 ++++++++++++++++++++++++++++++++ 5 files changed, 53 insertions(+), 6 deletions(-) diff --git a/generate/input/callbacks.json b/generate/input/callbacks.json index 46dbb4654..02cd33838 100644 --- a/generate/input/callbacks.json +++ b/generate/input/callbacks.json @@ -371,9 +371,9 @@ ], "return": { "type": "int", - "noResults": 1, + "noResults": 0, "success": 0, - "error": -1 + "error": 1 } }, "git_repository_mergehead_foreach_cb": { @@ -389,9 +389,9 @@ ], "return": { "type": "int", - "noResults": 1, + "noResults": 0, "success": 0, - "error": -1 + "error": 1 } }, "git_revwalk_hide_cb": { diff --git a/generate/input/descriptor.json b/generate/input/descriptor.json index 76fd9a99f..0d3a1b81d 100644 --- a/generate/input/descriptor.json +++ b/generate/input/descriptor.json @@ -1456,7 +1456,10 @@ "ignore": true }, "git_repository_fetchhead_foreach": { - "ignore": true + "isAsync": true, + "return": { + "isErrorCode": true + } }, "git_repository_hashfile": { "ignore": true diff --git a/lib/repository.js b/lib/repository.js index 57191e6d8..2c9058269 100644 --- a/lib/repository.js +++ b/lib/repository.js @@ -843,4 +843,14 @@ Repository.prototype.checkoutBranch = function(branch, opts) { }); }; +var fetchheadForeach = Repository.prototype.fetchheadForeach; +/** + * @async + * @param {FetchheadForeachCb} callback The callback function to be called on + * each entry + */ +Repository.prototype.fetchheadForeach = function(callback) { + return fetchheadForeach.call(this, callback, null); +}; + module.exports = Repository; diff --git a/test/runner.js b/test/runner.js index d3fe8ced3..8a4ff378f 100644 --- a/test/runner.js +++ b/test/runner.js @@ -55,7 +55,9 @@ beforeEach(function() { afterEach(function(done) { process.nextTick(function() { - global.gc(); + if (global.gc) { + global.gc(); + } done(); }); }); diff --git a/test/tests/repository.js b/test/tests/repository.js index 42006be03..4062e1440 100644 --- a/test/tests/repository.js +++ b/test/tests/repository.js @@ -137,4 +137,36 @@ describe("Repository", function() { }); }); }); + + it("gets fetch-heads", function() { + var repo = this.repository; + var foundMaster; + + return repo.fetch("origin", { + credentials: function(url, userName) { + return NodeGit.Cred.sshKeyFromAgent(userName); + }, + certificateCheck: function() { + return 1; + } + }) + .then(function() { + return repo.fetchheadForeach(function(refname, remoteUrl, oid, isMerge) { + if (refname == "refs/heads/master") { + foundMaster = true; + assert.equal(refname, "refs/heads/master"); + assert.equal(remoteUrl, "https://github.com/nodegit/test"); + assert.equal( + oid.toString(), + "32789a79e71fbc9e04d3eff7425e1771eb595150"); + assert.equal(isMerge, 1); + } + }); + }) + .then(function() { + if (!foundMaster) { + throw new Error("Couldn't find master in iteration of fetch heads"); + } + }); + }); }); From e8d214843dc090d0831dec847f9f1d7f7fdfeb22 Mon Sep 17 00:00:00 2001 From: John Haley Date: Thu, 26 Mar 2015 13:26:04 -0700 Subject: [PATCH 21/60] Update to use libgit2 v0.22.2 --- generate/input/{v0.22.1.json => v0.22.2.json} | 0 package.json | 6 +++--- 2 files changed, 3 insertions(+), 3 deletions(-) rename generate/input/{v0.22.1.json => v0.22.2.json} (100%) diff --git a/generate/input/v0.22.1.json b/generate/input/v0.22.2.json similarity index 100% rename from generate/input/v0.22.1.json rename to generate/input/v0.22.2.json diff --git a/package.json b/package.json index 18a74115b..532f28671 100644 --- a/package.json +++ b/package.json @@ -3,9 +3,9 @@ "description": "Node.js libgit2 asynchronous native bindings", "version": "0.3.3", "libgit2": { - "url": "https://github.com/nodegit/libgit2/tarball/4b3a1899ff37dddba0a095487505fed9ede101b1", - "sha": "4b3a1899ff37dddba0a095487505fed9ede101b1", - "version": "0.22.1" + "url": "https://github.com/libgit2/libgit2/tarball/fb6df50b7f250a4fd8b2fab257f119a5185e9bf5", + "sha": "fb6df50b7f250a4fd8b2fab257f119a5185e9bf5", + "version": "0.22.2" }, "libssh2": { "url": "http://www.libssh2.org/download/libssh2-1.4.3.tar.gz", From fd9882ab0e0ebfc5f477738328bf40429e06ffee Mon Sep 17 00:00:00 2001 From: John Haley Date: Fri, 27 Mar 2015 10:26:58 -0700 Subject: [PATCH 22/60] Add `Graph.aheadBehind` and tests --- generate/input/descriptor.json | 13 +++++++- generate/templates/filters/returns_info.js | 6 ++++ generate/templates/partials/convert_to_v8.cc | 2 +- test/tests/graph.js | 31 ++++++++++++++++++++ 4 files changed, 50 insertions(+), 2 deletions(-) create mode 100644 test/tests/graph.js diff --git a/generate/input/descriptor.json b/generate/input/descriptor.json index 0d3a1b81d..c763c0138 100644 --- a/generate/input/descriptor.json +++ b/generate/input/descriptor.json @@ -743,7 +743,18 @@ "graph": { "functions": { "git_graph_ahead_behind": { - "ignore": true + "args": { + "ahead": { + "isReturn": true + }, + "behind": { + "isReturn": true + } + }, + "isAsync": true, + "return": { + "isErrorCode": true + } } } }, diff --git a/generate/templates/filters/returns_info.js b/generate/templates/filters/returns_info.js index ff36e0c51..7eaf26e7a 100644 --- a/generate/templates/filters/returns_info.js +++ b/generate/templates/filters/returns_info.js @@ -1,3 +1,5 @@ +var isPointer = require("./is_pointer"); + module.exports = function(fn, argReturnsOnly, isAsync) { var result = []; var args = fn.args || []; @@ -11,6 +13,10 @@ module.exports = function(fn, argReturnsOnly, isAsync) { return_info.parsedName = isAsync ? "baton->" + return_info.name : return_info.name; return_info.isCppClassIntType = ~['Uint32', 'Int32'].indexOf(return_info.cppClassName); + return_info.needsDereference + = isAsync && + return_info.cppClassName == "Number" && + isPointer(return_info.cType); return_info.parsedClassName = (return_info.cppClassName || '').toLowerCase() + "_t"; return_info.returnNameOrName = return_info.returnName || return_info.name; return_info.jsOrCppClassName = return_info.jsClassName || return_info.cppClassName; diff --git a/generate/templates/partials/convert_to_v8.cc b/generate/templates/partials/convert_to_v8.cc index 1d2053791..aba2d9c97 100644 --- a/generate/templates/partials/convert_to_v8.cc +++ b/generate/templates/partials/convert_to_v8.cc @@ -22,7 +22,7 @@ {% if isCppClassIntType %} to = NanNew<{{ cppClassName }}>(({{ parsedClassName }}){{= parsedName =}}); {% else %} - to = NanNew<{{ cppClassName }}>({{= parsedName =}}); + to = NanNew<{{ cppClassName }}>({% if needsDereference %}*{% endif %}{{= parsedName =}}); {% endif %} {% elsif cppClassName == 'External' %} diff --git a/test/tests/graph.js b/test/tests/graph.js new file mode 100644 index 000000000..f90867a28 --- /dev/null +++ b/test/tests/graph.js @@ -0,0 +1,31 @@ +var assert = require("assert"); +var path = require("path"); +var local = path.join.bind(path, __dirname); + +describe("Graph", function() { + var NodeGit = require("../../"); + var Repository = NodeGit.Repository; + var Graph = NodeGit.Graph; + + var reposPath = local("../repos/workdir"); + + beforeEach(function() { + var test = this; + + return Repository.open(reposPath) + .then(function(repository) { + test.repository = repository; + }); + }); + + it.only("can get commits ahead/behind for 2 different commits", function() { + return Graph.aheadBehind( + this.repository, + "32789a79e71fbc9e04d3eff7425e1771eb595150", + "1729c73906bb8467f4095c2f4044083016b4dfde") + .then(function(result) { + assert.equal(result.ahead, 1); + assert.equal(result.behind, 1); + }); + }); +}); From 860b8f1b761767417103eb72c95da310927a5a9d Mon Sep 17 00:00:00 2001 From: John Haley Date: Fri, 27 Mar 2015 10:44:26 -0700 Subject: [PATCH 23/60] Remove `.only` --- test/tests/graph.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/tests/graph.js b/test/tests/graph.js index f90867a28..10f4db12b 100644 --- a/test/tests/graph.js +++ b/test/tests/graph.js @@ -18,7 +18,7 @@ describe("Graph", function() { }); }); - it.only("can get commits ahead/behind for 2 different commits", function() { + it("can get commits ahead/behind for 2 different commits", function() { return Graph.aheadBehind( this.repository, "32789a79e71fbc9e04d3eff7425e1771eb595150", From d0a018f76d0352965663c71526135056863e2bba Mon Sep 17 00:00:00 2001 From: John Haley Date: Fri, 27 Mar 2015 12:08:52 -0700 Subject: [PATCH 24/60] Allocate return values on `git_graph_ahead_behind` --- generate/input/descriptor.json | 2 ++ 1 file changed, 2 insertions(+) diff --git a/generate/input/descriptor.json b/generate/input/descriptor.json index c763c0138..6085baea8 100644 --- a/generate/input/descriptor.json +++ b/generate/input/descriptor.json @@ -745,9 +745,11 @@ "git_graph_ahead_behind": { "args": { "ahead": { + "shouldAlloc": true, "isReturn": true }, "behind": { + "shouldAlloc": true, "isReturn": true } }, From abf7dd75c4276e9ef3cd47bdee87fe0f5aecdeec Mon Sep 17 00:00:00 2001 From: Tim Branyen Date: Sun, 29 Mar 2015 23:13:43 -0400 Subject: [PATCH 25/60] Lots of complaints of missing build/Debug/nodegit Hopefully this will give more accurate errors. --- generate/templates/templates/nodegit.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/generate/templates/templates/nodegit.js b/generate/templates/templates/nodegit.js index c5b8d1da4..acf31dd05 100644 --- a/generate/templates/templates/nodegit.js +++ b/generate/templates/templates/nodegit.js @@ -7,8 +7,12 @@ var rawApi; try { rawApi = require("../build/Release/nodegit"); } -catch (e) { +catch (ex) { /* istanbul ignore next */ + if (ex.code !== "MODULE_NOT_FOUND") { + throw ex; + } + rawApi = require("../build/Debug/nodegit"); } From 62e9a5f8284361876f8879470859907c1915b57b Mon Sep 17 00:00:00 2001 From: Maximiliano Korp Date: Wed, 1 Apr 2015 22:15:17 -0700 Subject: [PATCH 26/60] add StatusFile.inWorkingTree and inIndex convenience methods --- lib/status_file.js | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/lib/status_file.js b/lib/status_file.js index 1b82aa1cb..ddce025b2 100644 --- a/lib/status_file.js +++ b/lib/status_file.js @@ -82,6 +82,20 @@ var StatusFile = function(args) { }, isIgnored: function() { return data.statusBit & codes.IGNORED; + }, + inWorkingTree: function() { + return status & codes.WT_NEW || + status & codes.WT_MODIFIED || + status & codes.WT_DELETED || + status & codes.WT_TYPECHANGE || + status & codes.WT_RENAMED; + }, + inIndex: function() { + return status & codes.INDEX_NEW || + status & codes.INDEX_MODIFIED || + status & codes.INDEX_DELETED || + status & codes.INDEX_TYPECHANGE || + status & codes.INDEX_RENAMED; } }; }; From edead1ce55c0ac697fffa582ce58b1016324dfe1 Mon Sep 17 00:00:00 2001 From: Maximiliano Korp Date: Wed, 1 Apr 2015 22:22:00 -0700 Subject: [PATCH 27/60] add test for new convenience methods --- test/tests/status_file.js | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/test/tests/status_file.js b/test/tests/status_file.js index cd669350d..dd709eee8 100644 --- a/test/tests/status_file.js +++ b/test/tests/status_file.js @@ -20,4 +20,9 @@ describe("StatusFile", function() { assert.ok(this.status.isNew()); assert.ok(!this.status.isModified()); }); + + it("detects working tree and index statuses", function() { + assert.ok(this.status.inWorkingTree()); + assert.ok(!this.status.inIndex()); + }); }); From 3528b52e567e0a9bb85327d537c4425a3ac571f0 Mon Sep 17 00:00:00 2001 From: John Haley Date: Sat, 4 Apr 2015 20:42:16 -0700 Subject: [PATCH 28/60] Add tests for stash --- generate/input/callbacks.json | 2 +- lib/stash.js | 9 ++++ test/tests/stash.js | 87 +++++++++++++++++++++++++++++++++++ 3 files changed, 97 insertions(+), 1 deletion(-) create mode 100644 lib/stash.js create mode 100644 test/tests/stash.js diff --git a/generate/input/callbacks.json b/generate/input/callbacks.json index 7beccbd54..5bec24c07 100644 --- a/generate/input/callbacks.json +++ b/generate/input/callbacks.json @@ -433,7 +433,7 @@ ], "return": { "type": "int", - "noResults": 1, + "noResults":0, "success": 0, "error": -1 } diff --git a/lib/stash.js b/lib/stash.js new file mode 100644 index 000000000..63aa2c6ce --- /dev/null +++ b/lib/stash.js @@ -0,0 +1,9 @@ +var NodeGit = require("../"); + +var Stash = NodeGit.Stash; + +// Override Stash.foreach to eliminate the need to pass null payload +var foreach = Stash.foreach; +Stash.foreach = function(repo, callback) { + return foreach(repo, callback, null); +}; diff --git a/test/tests/stash.js b/test/tests/stash.js new file mode 100644 index 000000000..0af8e7587 --- /dev/null +++ b/test/tests/stash.js @@ -0,0 +1,87 @@ +var assert = require("assert"); +var path = require("path"); +var promisify = require("promisify-node"); +var Promise = require("nodegit-promise"); +var fse = promisify(require("fs-extra")); +var local = path.join.bind(path, __dirname); + +describe("Stash", function() { + var NodeGit = require("../../"); + var Repository = NodeGit.Repository; + var Stash = NodeGit.Stash; + + var reposPath = local("../repos/workdir"); + + before(function() { + var test = this; + return Repository.open(reposPath) + .then(function(repository) { + test.repository = repository; + }); + }); + + it("gets no stashes on clean working directory", function() { + var stashes = []; + var stashCb = function(index, message, oid) { + stashes.push({index: index, message: message, oid: oid}); + }; + + return Stash.foreach(this.repository, stashCb) + .then(function() { + assert.equal(stashes.length, 0); + }); + }); + + it("can save and drop a stash", function() { + var fileName = "README.md"; + var fileContent = "Cha-cha-cha-chaaaaaangessssss"; + var repo = this.repository; + var filePath = path.join(repo.workdir(), fileName); + var oldContent; + var stashes = []; + var stashOid; + var stashMessage = "stash test"; + + return fse.readFile(filePath) + .then(function(content) { + oldContent = content; + return fse.writeFile(filePath, fileContent); + }) + .then(function() { + return Stash.save(repo, repo.defaultSignature(), stashMessage, 0); + }) + .then(function(oid) { + stashOid = oid; + var stashCb = function(index, message, oid) { + stashes.push({index: index, message: message, oid: oid}); + }; + + return Stash.foreach(repo, stashCb); + }) + .then(function() { + assert.equal(stashes.length, 1); + assert.equal(stashes[0].index, 0); + assert.equal(stashes[0].message, "On master: " + stashMessage); + assert.equal(stashes[0].oid.toString(), stashOid.toString()); + + return Stash.drop(repo, 0); + }) + .then(function () { + stashes = []; + var stashCb = function(index, message, oid) { + stashes.push({index: index, message: message, oid: oid}); + }; + + return Stash.foreach(repo, stashCb); + }) + .then(function() { + assert.equal(stashes.length, 0); + }) + .catch(function(e) { + return fse.writeFile(filePath, oldContent) + .then(function() { + return Promise.reject(e); + }); + }); + }); +}); From 40a3e1b13a9a5c63173dbe722857980bbdc00b87 Mon Sep 17 00:00:00 2001 From: Vladimir Rutsky Date: Mon, 6 Apr 2015 19:09:44 +0300 Subject: [PATCH 29/60] fix typo: "byes" --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 4d4778587..aba7d7a4e 100644 --- a/README.md +++ b/README.md @@ -94,7 +94,7 @@ clone("https://github.com/nodegit/nodegit", "tmp", null) }) // Display information about the blob. .then(function(blob) { - // Show the name, sha, and filesize in byes. + // Show the name, sha, and filesize in bytes. console.log(blob.entry.name() + blob.entry.sha() + blob.size() + "b"); // Show a spacer. From 23c6c70d713bfdd062af6f3963d874e0d0254b51 Mon Sep 17 00:00:00 2001 From: John Haley Date: Tue, 7 Apr 2015 13:28:09 -0700 Subject: [PATCH 30/60] Fix freeing a `GitOid` that was passed as a string --- generate/templates/partials/sync_function.cc | 2 +- test/tests/oid.js | 17 +++++++++++++++++ 2 files changed, 18 insertions(+), 1 deletion(-) diff --git a/generate/templates/partials/sync_function.cc b/generate/templates/partials/sync_function.cc index 136f8427c..eaca6480f 100644 --- a/generate/templates/partials/sync_function.cc +++ b/generate/templates/partials/sync_function.cc @@ -82,7 +82,7 @@ from_{{ arg.name }} {%each args|argsInfo as arg %} {%if arg | isOid %} if (args[{{ arg.jsArg }}]->IsString()) { - free(&from_{{ arg.name }}); + free((void *)from_{{ arg.name }}); } {%endif%} {%endeach%} diff --git a/test/tests/oid.js b/test/tests/oid.js index 8efcb12b4..7ec57631d 100644 --- a/test/tests/oid.js +++ b/test/tests/oid.js @@ -1,4 +1,6 @@ var assert = require("assert"); +var path = require("path"); +var local = path.join.bind(path, __dirname); describe("Oid", function() { var NodeGit = require("../../"); @@ -26,4 +28,19 @@ describe("Oid", function() { assert.equal(inspect, "[Oid " + oid + "]"); }); + + it("can convert strings to oids in parameters", function() { + return NodeGit.Repository.open(local("../repos/workdir")) + .then(function(repo) { + var revwalk = repo.createRevWalk(); + revwalk.sorting(NodeGit.Revwalk.SORT.TIME); + + revwalk.push(oid); + + return revwalk.getCommits(1); + }) + .then(function(commits) { + assert.equal(commits[0].toString(), oid); + }); + }); }); From 5fbb55ffa41a6549cef99567e902b5d379314049 Mon Sep 17 00:00:00 2001 From: Tim Branyen Date: Thu, 9 Apr 2015 10:58:51 -0400 Subject: [PATCH 31/60] Attempt remove the delete keyword --- lib/clone.js | 1 - 1 file changed, 1 deletion(-) diff --git a/lib/clone.js b/lib/clone.js index b1388b589..6fb2dbade 100644 --- a/lib/clone.js +++ b/lib/clone.js @@ -18,7 +18,6 @@ Clone.clone = function(url, local_path, options) { if (options) { remoteCallbacks = options.remoteCallbacks; - delete options.remoteCallbacks; } options = normalizeOptions(options, NodeGit.CloneOptions); From 2acd780dd9d061cc976e3117e0eb9e6eb8fb5fed Mon Sep 17 00:00:00 2001 From: John Haley Date: Thu, 9 Apr 2015 22:20:45 -0700 Subject: [PATCH 32/60] Set error on return for `git_branch_set_upstream` --- generate/input/descriptor.json | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/generate/input/descriptor.json b/generate/input/descriptor.json index 2e6b09e97..2ddd7b5b5 100644 --- a/generate/input/descriptor.json +++ b/generate/input/descriptor.json @@ -173,7 +173,10 @@ } }, "git_branch_upstream": { - "isAsync": false + "isAsync": false, + "return" : { + "isErrorCode": true + } } } }, From 84405fd8cf7462dd1c14934aef62530bdd225197 Mon Sep 17 00:00:00 2001 From: John Haley Date: Thu, 9 Apr 2015 22:27:46 -0700 Subject: [PATCH 33/60] Fix `Status.file` --- generate/input/descriptor.json | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/generate/input/descriptor.json b/generate/input/descriptor.json index 2ddd7b5b5..68fff3230 100644 --- a/generate/input/descriptor.json +++ b/generate/input/descriptor.json @@ -1604,6 +1604,16 @@ "git_status_byindex": { "isAsync": false }, + "git_status_file": { + "args": { + "status_flags": { + "isReturn": true + }, + "return": { + "isErrorCode": true + } + } + }, "git_status_foreach": { "isAsync": true, "return": { From 8c35271b2c3168f55909062eef07539d9ad57d26 Mon Sep 17 00:00:00 2001 From: Brian Leathem Date: Fri, 17 Apr 2015 12:16:26 -0700 Subject: [PATCH 34/60] Introduced a new ConvenientLine class to wrap the lines returned from ConvenientHunk. Overrode the line content method to provide more useful results. --- generate/templates/templates/nodegit.js | 1 + lib/convenient_hunk.js | 3 +- lib/convenient_line.js | 73 +++++++++++++++++++++++++ test/tests/diff.js | 15 ++++- 4 files changed, 89 insertions(+), 3 deletions(-) create mode 100644 lib/convenient_line.js diff --git a/generate/templates/templates/nodegit.js b/generate/templates/templates/nodegit.js index acf31dd05..99e2b4a0a 100644 --- a/generate/templates/templates/nodegit.js +++ b/generate/templates/templates/nodegit.js @@ -71,6 +71,7 @@ require("./utils/lookup_wrapper"); require("./utils/normalize_options"); // Load up extra types; +require("./convenient_line"); require("./convenient_hunk"); require("./convenient_patch"); require("./status_file"); diff --git a/lib/convenient_hunk.js b/lib/convenient_hunk.js index 9c28dd296..ca3d8f0e6 100644 --- a/lib/convenient_hunk.js +++ b/lib/convenient_hunk.js @@ -1,4 +1,5 @@ var NodeGit = require("../"); +var ConvenientLine = NodeGit.ConvenientLine; function ConvenientHunk(raw, i) { this.raw = raw; @@ -29,7 +30,7 @@ ConvenientHunk.prototype.size = function() { ConvenientHunk.prototype.lines = function() { var result = []; for (var i = 0; i < this.size(); i++) { - result.push(this.raw.getLineInHunk(this.i, i)); + result.push(new ConvenientLine(this.raw.getLineInHunk(this.i, i), i)); } return result; }; diff --git a/lib/convenient_line.js b/lib/convenient_line.js new file mode 100644 index 000000000..2d39f6501 --- /dev/null +++ b/lib/convenient_line.js @@ -0,0 +1,73 @@ +var NodeGit = require("../"); + +function ConvenientLine(raw, i) { + this.raw = raw; + this.i = i; +} + +/** +* The content of the line +* @return {String} +*/ +ConvenientLine.prototype.origin = function() { + return this.raw.origin(); +}; + +/** +* The content of the line +* @return {String} +*/ +ConvenientLine.prototype.oldLineno = function() { + return this.raw.oldLineno(); +}; + +/** +* The content of the line +* @return {String} +*/ +ConvenientLine.prototype.newLineno = function() { + return this.raw.newLineno(); +}; + +/** +* The content of the line +* @return {String} +*/ +ConvenientLine.prototype.numLines = function() { + return this.raw.numLines(); +}; + +/** +* The content of the line +* @return {String} +*/ +ConvenientLine.prototype.contentLen = function() { + return this.raw.contentLen(); +}; + + +/** +* The content of the line +* @return {String} +*/ +ConvenientLine.prototype.contentOffset = function() { + return this.raw.contentOffset(); +}; + +/** +* The content of the line +* @return {String} +*/ +ConvenientLine.prototype.rawContent = function() { + return this.raw.content(); +}; + +/** +* The relevant line +* @return {String} +*/ +ConvenientLine.prototype.content = function() { + return this.raw.content().substring(0, this.raw.contentLen() - 1); +}; + +NodeGit.ConvenientLine = ConvenientLine; diff --git a/test/tests/diff.js b/test/tests/diff.js index 96c720a0e..dd8f6d8d8 100644 --- a/test/tests/diff.js +++ b/test/tests/diff.js @@ -108,14 +108,14 @@ describe("Diff", function() { var oldContent = "__Before submitting a pull request, please ensure " + "both unit tests and lint checks pass.__\n"; - assert.equal(lines[3].content(), oldContent); + assert.equal(lines[3].rawContent(), oldContent); assert.equal(lines[3].origin(), Diff.LINE.DELETION); assert.equal(lines[3].contentLen(), 90); var newContent = "__Before submitting a pull request, please ensure " + "both that you've added unit tests to cover your shiny new code, " + "and that all unit tests and lint checks pass.__\n"; - assert.equal(lines[4].content(), newContent); + assert.equal(lines[4].rawContent(), newContent); assert.equal(lines[4].origin(), Diff.LINE.ADDITION); assert.equal(lines[4].contentLen(), 162); }); @@ -134,6 +134,17 @@ describe("Diff", function() { assert.equal(newFile.size(), 23); }); + it("can resolve individual line chages from the patch hunks", function() { + this.workdirDiff.patches().forEach(function(convenientPatch) { + convenientPatch.hunks().forEach(function(convenientHunk) { + convenientHunk.lines().forEach(function(line) { + assert(!/\n/.exec(line.content())); + assert(/\n/.exec(line.rawContent())); + }); + }); + }); + }); + it("can diff with a null tree", function() { var repo = this.repository; var tree = this.masterCommitTree; From 6995bf43f65d17b1e53f5961d5b91b2ae565acc7 Mon Sep 17 00:00:00 2001 From: John Haley Date: Fri, 17 Apr 2015 16:17:56 -0700 Subject: [PATCH 35/60] Fixed `Stash` tests --- generate/input/descriptor.json | 6 +++++- generate/scripts/generateNativeCode.js | 2 +- generate/templates/filters/has_return_value.js | 9 +++++++++ generate/templates/filters/has_returns.js | 15 --------------- generate/templates/partials/sync_function.cc | 4 ++-- lib/oid.js | 4 ++++ lib/stash.js | 9 ++++++++- 7 files changed, 29 insertions(+), 20 deletions(-) create mode 100644 generate/templates/filters/has_return_value.js delete mode 100644 generate/templates/filters/has_returns.js diff --git a/generate/input/descriptor.json b/generate/input/descriptor.json index 68fff3230..75b886330 100644 --- a/generate/input/descriptor.json +++ b/generate/input/descriptor.json @@ -1095,7 +1095,11 @@ "shouldAlloc": true, "functions": { "git_oid_cpy": { - "ignore": true + "args": { + "out": { + "isReturn": true + } + } }, "git_oid_fmt": { "ignore": true diff --git a/generate/scripts/generateNativeCode.js b/generate/scripts/generateNativeCode.js index 3774d1d56..4e2884c1b 100644 --- a/generate/scripts/generateNativeCode.js +++ b/generate/scripts/generateNativeCode.js @@ -56,7 +56,7 @@ module.exports = function generateNativeCode() { defaultValue: require("../templates/filters/default_value"), fieldsInfo: require("../templates/filters/fields_info"), hasReturnType: require("../templates/filters/has_return_type"), - hasReturns: require("../templates/filters/has_returns"), + hasReturnValue: require("../templates/filters/has_return_value"), isDoublePointer: require("../templates/filters/is_double_pointer"), isFixedLengthString: require("../templates/filters/is_fixed_length_string"), isOid: require("../templates/filters/is_oid"), diff --git a/generate/templates/filters/has_return_value.js b/generate/templates/filters/has_return_value.js new file mode 100644 index 000000000..bbe371808 --- /dev/null +++ b/generate/templates/filters/has_return_value.js @@ -0,0 +1,9 @@ +module.exports = function(fn) { + if (fn.return + && !fn.return.isErrorCode + && fn.return.cType != "void") { + return true + } + + return false; +}; diff --git a/generate/templates/filters/has_returns.js b/generate/templates/filters/has_returns.js deleted file mode 100644 index 733bfe6a3..000000000 --- a/generate/templates/filters/has_returns.js +++ /dev/null @@ -1,15 +0,0 @@ -module.exports = function(fn) { - var args = fn.args || []; - var result = args.some(function (arg) { - return arg.isReturn; - }); - - if (!result - && fn.return - && !fn.return.isErrorCode - && fn.return.cType != "void") { - result = true; - } - - return result || (fn.return && fn.return.isErrorCode); -}; diff --git a/generate/templates/partials/sync_function.cc b/generate/templates/partials/sync_function.cc index eaca6480f..cf9ab11f2 100644 --- a/generate/templates/partials/sync_function.cc +++ b/generate/templates/partials/sync_function.cc @@ -36,7 +36,7 @@ NAN_METHOD({{ cppClassName }}::{{ cppFunctionName }}) { if (ObjectWrap::Unwrap<{{ cppClassName }}>(args.This())->GetValue() != NULL) { {% endif %} -{%if .|hasReturns %} +{%if .|hasReturnValue %} {{ return.cType }} result = {%endif%}{{ cFunctionName }}( {%each args|argsInfo as arg %} {%if arg.isReturn %} @@ -53,7 +53,7 @@ from_{{ arg.name }} {%endeach%} ); -{%if return.isErrorCode %} +{%if .|hasReturnValue |and return.isErrorCode %} if (result != GIT_OK) { {%each args|argsInfo as arg %} {%if arg.shouldAlloc %} diff --git a/lib/oid.js b/lib/oid.js index 42d4405af..c3a84ecfb 100644 --- a/lib/oid.js +++ b/lib/oid.js @@ -14,6 +14,10 @@ Object.defineProperties(Oid.prototype, { } }); +Oid.prototype.copy = function() { + return this.cpy(); // seriously??? +}; + Oid.prototype.inspect = function() { return "[Oid " + this.allocfmt() + "]"; }; diff --git a/lib/stash.js b/lib/stash.js index 63aa2c6ce..960d7b648 100644 --- a/lib/stash.js +++ b/lib/stash.js @@ -5,5 +5,12 @@ var Stash = NodeGit.Stash; // Override Stash.foreach to eliminate the need to pass null payload var foreach = Stash.foreach; Stash.foreach = function(repo, callback) { - return foreach(repo, callback, null); + function wrappedCallback(index, message, oid) { + // We need to copy the OID since libgit2 types are getting cleaned up + // incorrectly right now in callbacks + + return callback(index, message, oid.copy()); + } + + return foreach(repo, wrappedCallback, null); }; From f0f8dfef68fa99d500ff8fbf3976f55e6fe23047 Mon Sep 17 00:00:00 2001 From: Tim Date: Sun, 22 Mar 2015 01:13:41 -0400 Subject: [PATCH 36/60] Added Note tests Wanted to see if native code coverage would be affected. Yup! --- test/tests/note.js | 52 ++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 52 insertions(+) create mode 100644 test/tests/note.js diff --git a/test/tests/note.js b/test/tests/note.js new file mode 100644 index 000000000..0b1ca1db8 --- /dev/null +++ b/test/tests/note.js @@ -0,0 +1,52 @@ +var assert = require("assert"); +var path = require("path"); +var local = path.join.bind(path, __dirname); + +describe("Note", function() { + var NodeGit = require("../../"); + var Note = NodeGit.Note; + var Signature = NodeGit.Signature; + var reposPath = local("../repos/merge"); + + beforeEach(function() { + var test = this; + + return NodeGit.Repository.open(reposPath).then(function(repository) { + test.repository = repository; + + return repository.getMasterCommit().then(function(commit) { + test.commit = commit; + }); + }); + }); + + it("can be created", function() { + var sha = this.commit.id(); + var sig = Signature.create("John", "john@doe.com", Date.now(), 0); + var noteRef = "refs/notes/commits"; + + return Note.create(this.repository, noteRef, sig, sig, sha, "Testing!", 1); + }); + + it("can be read", function() { + var sha = this.commit.id(); + var noteRef = "refs/notes/commits"; + + return Note.read(this.repository, noteRef, sha).then(function(note) { + assert.equal(note.message(), "Testing!"); + }); + }); + + it("can be removed", function(done) { + var sha = this.commit.id(); + var noteRef = "refs/notes/commits"; + var sig = Signature.create("John", "john@doe.com", Date.now(), 0); + + Note.remove(this.repository, noteRef, sig, sig, sha); + + return Note.read(this.repository, noteRef, sha).catch(function(ex) { + assert.equal(ex.message, "Note could not be found"); + done(); + }); + }); +}); From fab9237a544a01c1a34b99c0cf82132e3bbf2ab1 Mon Sep 17 00:00:00 2001 From: Tim Date: Sun, 22 Mar 2015 01:41:44 -0400 Subject: [PATCH 37/60] Enable note foreach and remove async And added testing goodness! --- generate/input/callbacks.json | 8 ++++++-- generate/input/descriptor.json | 11 ++++++++++- lib/note.js | 9 +++++++++ test/tests/note.js | 31 ++++++++++++++++++++++++------- 4 files changed, 49 insertions(+), 10 deletions(-) create mode 100644 lib/note.js diff --git a/generate/input/callbacks.json b/generate/input/callbacks.json index 6c5837c31..708edc27e 100644 --- a/generate/input/callbacks.json +++ b/generate/input/callbacks.json @@ -273,7 +273,11 @@ "git_note_foreach_cb": { "args": [ { - "name": "id", + "name": "blob_id", + "cType": "const git_oid *" + }, + { + "name": "annotated_object_id", "cType": "const git_oid *" }, { @@ -283,7 +287,7 @@ ], "return": { "type": "int", - "noResults": 1, + "noResults": 0, "success": 0, "error": -1 } diff --git a/generate/input/descriptor.json b/generate/input/descriptor.json index 75b886330..01f2a5f49 100644 --- a/generate/input/descriptor.json +++ b/generate/input/descriptor.json @@ -960,8 +960,17 @@ } } }, + "git_note_remove": { + "isAsync": true, + "return": { + "isErrorCode": true + } + }, "git_note_foreach": { - "ignore": true + "isAsync": true, + "return": { + "isErrorCode": true + } } } }, diff --git a/lib/note.js b/lib/note.js new file mode 100644 index 000000000..40926f498 --- /dev/null +++ b/lib/note.js @@ -0,0 +1,9 @@ +var NodeGit = require("../"); + +var Note = NodeGit.Note; + +// Override Note.foreach to eliminate the need to pass null payload +var foreach = Note.foreach; +Note.foreach = function(repo, notesRef, callback) { + return foreach(repo, notesRef, callback, null); +}; diff --git a/test/tests/note.js b/test/tests/note.js index 0b1ca1db8..1624714e7 100644 --- a/test/tests/note.js +++ b/test/tests/note.js @@ -6,7 +6,7 @@ describe("Note", function() { var NodeGit = require("../../"); var Note = NodeGit.Note; var Signature = NodeGit.Signature; - var reposPath = local("../repos/merge"); + var reposPath = local("../../"); beforeEach(function() { var test = this; @@ -37,16 +37,33 @@ describe("Note", function() { }); }); + it("can iterate all notes", function() { + var test = this; + var noteRef = "refs/notes/commits"; + var ref = null; + + return Note.foreach(this.repository, noteRef, function(blobId, objectId) { + ref = objectId; + }).then(function() { + return NodeGit.Note.read(test.repository, noteRef, ref) + .then(function(note) { + assert.equal(note.message(), "Testing!"); + }); + }); + }); + it("can be removed", function(done) { + var test = this; var sha = this.commit.id(); var noteRef = "refs/notes/commits"; var sig = Signature.create("John", "john@doe.com", Date.now(), 0); - Note.remove(this.repository, noteRef, sig, sig, sha); - - return Note.read(this.repository, noteRef, sha).catch(function(ex) { - assert.equal(ex.message, "Note could not be found"); - done(); - }); + return Note.remove(this.repository, noteRef, sig, sig, sha) + .then(function() { + return Note.read(test.repository, noteRef, sha).catch(function(ex) { + assert.equal(ex.message, "Note could not be found"); + done(); + }); + }); }); }); From 2cef5b584bc81085333c47d0455570c030a7ded9 Mon Sep 17 00:00:00 2001 From: John Haley Date: Fri, 17 Apr 2015 21:17:33 -0700 Subject: [PATCH 38/60] Fix note tests --- lib/note.js | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/lib/note.js b/lib/note.js index 40926f498..4f3ff76bb 100644 --- a/lib/note.js +++ b/lib/note.js @@ -5,5 +5,12 @@ var Note = NodeGit.Note; // Override Note.foreach to eliminate the need to pass null payload var foreach = Note.foreach; Note.foreach = function(repo, notesRef, callback) { - return foreach(repo, notesRef, callback, null); + function wrapperCallback(blobId, objectId) { + // We need to copy the OID since libgit2 types are getting cleaned up + // incorrectly right now in callbacks + + return callback(blobId.copy(), objectId.copy()); + } + + return foreach(repo, notesRef, wrapperCallback, null); }; From adfa8615097346d2e5117d5c59cb0432c8d71440 Mon Sep 17 00:00:00 2001 From: John Haley Date: Sun, 19 Apr 2015 12:30:40 -0700 Subject: [PATCH 39/60] Bump "nodegit-promise" version --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 532f28671..7bb119786 100644 --- a/package.json +++ b/package.json @@ -56,7 +56,7 @@ "dependencies": { "fs-extra": "^0.16.3", "node-pre-gyp": "^0.6.2", - "nodegit-promise": "~1.0.0", + "nodegit-promise": "^2.0.0", "npm": "^2.5.0", "promisify-node": "^0.1.5", "which-native-nodish": "^1.0.3" From 6b5347d1b8fb3ba6aa0d51564439c42e3da10375 Mon Sep 17 00:00:00 2001 From: John Haley Date: Sun, 19 Apr 2015 21:16:43 -0700 Subject: [PATCH 40/60] Make `Remote.delete` async and return error messages correctly This fixes #539 --- generate/input/descriptor.json | 6 ++++++ test/tests/remote.js | 23 +++++++++++++++-------- 2 files changed, 21 insertions(+), 8 deletions(-) diff --git a/generate/input/descriptor.json b/generate/input/descriptor.json index 01f2a5f49..523d1e65e 100644 --- a/generate/input/descriptor.json +++ b/generate/input/descriptor.json @@ -1364,6 +1364,12 @@ "git_remote_default_branch": { "ignore": true }, + "git_remote_delete": { + "isAsync": true, + "return": { + "isErrorCode": true + } + }, "git_remote_fetch": { "args": { "reflog_message": { diff --git a/test/tests/remote.js b/test/tests/remote.js index 3b24f6a4b..9ac619af1 100644 --- a/test/tests/remote.js +++ b/test/tests/remote.js @@ -13,10 +13,16 @@ describe("Remote", function() { var url2 = "https://github.com/nodegit/test2"; function removeOrigins(repository) { - Remote.delete(repository, "origin1"); - Remote.delete(repository, "origin2"); - Remote.delete(repository, "origin3"); - Remote.delete(repository, "test2"); + return Promise.all([ + Remote.delete(repository, "origin1"), + Remote.delete(repository, "origin2"), + Remote.delete(repository, "origin3"), + Remote.delete(repository, "test2") + ]) + .catch(function() { + // We don't care if a remote was unable to be deleted. Just try to wipe + // everything and we'll start from a clean slate each time. + }); } beforeEach(function() { @@ -76,9 +82,10 @@ describe("Remote", function() { var repository = this.repository; Remote.create(repository, "origin3", url); - Remote.delete(repository, "origin3"); - - return Remote.lookup(repository, "origin3") + return Remote.delete(repository, "origin3") + .then(function() { + return Remote.lookup(repository, "origin3"); + }) .then(Promise.reject, Promise.resolve); }); @@ -131,7 +138,7 @@ describe("Remote", function() { .then(function() { assert.ok(wasCalled); - Remote.delete(repo, "test2"); + return Remote.delete(repo, "test2"); }); }); From 7222c412fbe6f4a60120c3185f327e2aa122a325 Mon Sep 17 00:00:00 2001 From: John Haley Date: Sun, 19 Apr 2015 22:42:17 -0700 Subject: [PATCH 41/60] Add get/set config string methods and tests This fixes #449 --- generate/input/descriptor.json | 16 +++++++- test/tests/config.js | 71 ++++++++++++++++++++++++++++++++++ 2 files changed, 85 insertions(+), 2 deletions(-) create mode 100644 test/tests/config.js diff --git a/generate/input/descriptor.json b/generate/input/descriptor.json index 523d1e65e..90b06ed4a 100644 --- a/generate/input/descriptor.json +++ b/generate/input/descriptor.json @@ -388,7 +388,10 @@ "ignore": true }, "git_config_get_string": { - "ignore": true + "isAsync": true, + "return": { + "isErrorCode": true + } }, "git_config_iterator_free": { "ignore": true @@ -415,7 +418,10 @@ "ignore": true }, "git_config_open_default": { - "ignore": true + "isAsync": true, + "return": { + "isErrorCode": true + } }, "git_config_open_global": { "ignore": true @@ -443,6 +449,12 @@ }, "git_config_set_int32": { "ignore": true + }, + "git_config_set_string": { + "isAsync": true, + "return": { + "isErrorCode": true + } } } }, diff --git a/test/tests/config.js b/test/tests/config.js new file mode 100644 index 000000000..f6e19bd21 --- /dev/null +++ b/test/tests/config.js @@ -0,0 +1,71 @@ +var assert = require("assert"); +var path = require("path"); +var local = path.join.bind(path, __dirname); +var promisify = require("promisify-node"); + +// Have to wrap exec, since it has a weird callback signature. +var exec = promisify(function(command, opts, callback) { + return require("child_process").exec(command, opts, callback); +}); + +describe("Config", function() { + var NodeGit = require("../../"); + + var reposPath = local("../repos/workdir"); + + it("can get and set a global value", function() { + var savedUserName; + + return exec("git config --global user.name") + .then(function(userName) { + savedUserName = userName.trim(); + + return exec( + "git config --global user.name \"" + savedUserName + "-test\""); + }) + .then(function() { + return NodeGit.Config.openDefault(); + }) + .then(function(config) { + return config.getString("user.name"); + }) + .then(function(userNameFromNodeGit) { + assert.equal(savedUserName + "-test", userNameFromNodeGit); + }) + .finally(function() { + return exec("git config --global user.name \"" + savedUserName + "\""); + }); + }); + + it("can get and set a repo config value", function() { + var savedUserName; + + return exec("git config user.name", { + cwd: reposPath + }) + .then(function(userName) { + savedUserName = userName.trim(); + + return exec("git config user.name \"" + savedUserName + "-test\"", { + cwd: reposPath + }); + }) + .then(function() { + return NodeGit.Repository.open(reposPath); + }) + .then(function(repo) { + return repo.config(); + }) + .then(function(config) { + return config.getString("user.name"); + }) + .then(function(userNameFromNodeGit) { + assert.equal(savedUserName + "-test", userNameFromNodeGit); + }) + .finally(function() { + return exec("git config user.name \"" + savedUserName + "\"", { + cwd: reposPath + }); + }); + }); +}); From d1d15ff7873392a8dbf50969231a2b58817b0ed7 Mon Sep 17 00:00:00 2001 From: John Haley Date: Sun, 19 Apr 2015 22:47:20 -0700 Subject: [PATCH 42/60] Fix cleanup in remote tests --- test/tests/remote.js | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/test/tests/remote.js b/test/tests/remote.js index 9ac619af1..ba6e37494 100644 --- a/test/tests/remote.js +++ b/test/tests/remote.js @@ -12,17 +12,17 @@ describe("Remote", function() { var url = "https://github.com/nodegit/test"; var url2 = "https://github.com/nodegit/test2"; - function removeOrigins(repository) { - return Promise.all([ - Remote.delete(repository, "origin1"), - Remote.delete(repository, "origin2"), - Remote.delete(repository, "origin3"), - Remote.delete(repository, "test2") - ]) - .catch(function() { - // We don't care if a remote was unable to be deleted. Just try to wipe - // everything and we'll start from a clean slate each time. - }); + function removeOrigins(repo) { + return repo.getRemotes() + .then(function(remotes) { + var promises = []; + + remotes.forEach(function(remote) { + promises.push(Remote.delete(repo, remote.name())); + }); + + return Promise.all(promises); + }); } beforeEach(function() { From 84496c8adfc8cb4309b8cacb8242d9bbe61c995a Mon Sep 17 00:00:00 2001 From: John Haley Date: Sun, 19 Apr 2015 23:10:32 -0700 Subject: [PATCH 43/60] Fix tests --- test/tests/config.js | 20 ++++++++++++-------- test/tests/remote.js | 4 +++- 2 files changed, 15 insertions(+), 9 deletions(-) diff --git a/test/tests/config.js b/test/tests/config.js index f6e19bd21..3afeb6d8e 100644 --- a/test/tests/config.js +++ b/test/tests/config.js @@ -16,6 +16,10 @@ describe("Config", function() { it("can get and set a global value", function() { var savedUserName; + function finallyFn() { + return exec("git config --global user.name \"" + savedUserName + "\""); + } + return exec("git config --global user.name") .then(function(userName) { savedUserName = userName.trim(); @@ -32,14 +36,18 @@ describe("Config", function() { .then(function(userNameFromNodeGit) { assert.equal(savedUserName + "-test", userNameFromNodeGit); }) - .finally(function() { - return exec("git config --global user.name \"" + savedUserName + "\""); - }); + .then(finallyFn, finallyFn); }); it("can get and set a repo config value", function() { var savedUserName; + function finallyFn() { + return exec("git config user.name \"" + savedUserName + "\"", { + cwd: reposPath + }); + } + return exec("git config user.name", { cwd: reposPath }) @@ -62,10 +70,6 @@ describe("Config", function() { .then(function(userNameFromNodeGit) { assert.equal(savedUserName + "-test", userNameFromNodeGit); }) - .finally(function() { - return exec("git config user.name \"" + savedUserName + "\"", { - cwd: reposPath - }); - }); + .then(finallyFn, finallyFn); }); }); diff --git a/test/tests/remote.js b/test/tests/remote.js index ba6e37494..d32fda781 100644 --- a/test/tests/remote.js +++ b/test/tests/remote.js @@ -18,7 +18,9 @@ describe("Remote", function() { var promises = []; remotes.forEach(function(remote) { - promises.push(Remote.delete(repo, remote.name())); + if (remote !== "origin") { + promises.push(Remote.delete(repo, remote)); + } }); return Promise.all(promises); From c37772284a2531096fd0971827175f79e90ec0ca Mon Sep 17 00:00:00 2001 From: John Haley Date: Mon, 20 Apr 2015 13:03:02 -0700 Subject: [PATCH 44/60] This fixes polling sync promises in callbacks. This also fixes #497. --- generate/templates/partials/callback_helpers.cc | 11 ++++++++--- generate/templates/partials/field_accessors.cc | 10 +++++++--- 2 files changed, 15 insertions(+), 6 deletions(-) diff --git a/generate/templates/partials/callback_helpers.cc b/generate/templates/partials/callback_helpers.cc index f5bc67f71..8c1d34651 100644 --- a/generate/templates/partials/callback_helpers.cc +++ b/generate/templates/partials/callback_helpers.cc @@ -80,6 +80,7 @@ void {{ cppClassName }}::{{ cppFunctionName }}_{{ cbFunction.name }}_async(uv_as NanAssignPersistent(baton->promise, promise); + uv_close((uv_handle_t*) &baton->req, NULL); uv_async_init(uv_default_loop(), &baton->req, (uv_async_cb) {{ cppFunctionName }}_{{ cbFunction.name }}_asyncPromisePolling); uv_async_send(&baton->req); return; @@ -110,7 +111,9 @@ void {{ cppClassName }}::{{ cppFunctionName }}_{{ cbFunction.name }}_async(uv_as baton->result = {{ cbFunction.return.noResults }}; } {% endeach %} + baton->done = true; + uv_close((uv_handle_t*) &baton->req, NULL); } void {{ cppClassName }}::{{ cppFunctionName }}_{{ cbFunction.name }}_asyncPromisePolling(uv_async_t* req, int status) { @@ -120,7 +123,7 @@ void {{ cppClassName }}::{{ cppFunctionName }}_{{ cbFunction.name }}_asyncPromis Local promise = NanNew(baton->promise); NanCallback* isPendingFn = new NanCallback(promise->Get(NanNew("isPending")).As()); Local argv[1]; // MSBUILD won't assign an array of length 0 - Local isPending = isPendingFn->Call(0, argv)->ToBoolean(); + Local isPending = isPendingFn->Call(promise, 0, argv)->ToBoolean(); if (isPending->Value()) { uv_async_send(&baton->req); @@ -128,11 +131,11 @@ void {{ cppClassName }}::{{ cppFunctionName }}_{{ cbFunction.name }}_asyncPromis } NanCallback* isFulfilledFn = new NanCallback(promise->Get(NanNew("isFulfilled")).As()); - Local isFulfilled = isFulfilledFn->Call(0, argv)->ToBoolean(); + Local isFulfilled = isFulfilledFn->Call(promise, 0, argv)->ToBoolean(); if (isFulfilled->Value()) { NanCallback* resultFn = new NanCallback(promise->Get(NanNew("value")).As()); - Handle result = resultFn->Call(0, argv); + Handle result = resultFn->Call(promise, 0, argv); {% each cbFunction|returnsInfo false true as _return %} if (result.IsEmpty() || result->IsNativeError()) { @@ -165,6 +168,8 @@ void {{ cppClassName }}::{{ cppFunctionName }}_{{ cbFunction.name }}_asyncPromis baton->result = {{ cbFunction.return.error }}; baton->done = false; } + + uv_close((uv_handle_t*) &baton->req, NULL); } {%endif%} {%endeach%} diff --git a/generate/templates/partials/field_accessors.cc b/generate/templates/partials/field_accessors.cc index f5f3aa448..03131d6ba 100644 --- a/generate/templates/partials/field_accessors.cc +++ b/generate/templates/partials/field_accessors.cc @@ -173,6 +173,7 @@ NanAssignPersistent(baton->promise, promise); + uv_close((uv_handle_t*) &baton->req, NULL); uv_async_init(uv_default_loop(), &baton->req, (uv_async_cb) {{ field.name }}_asyncPromisePolling); uv_async_send(&baton->req); return; @@ -204,6 +205,7 @@ } {% endeach %} baton->done = true; + uv_close((uv_handle_t*) &baton->req, NULL); } void {{ cppClassName }}::{{ field.name }}_asyncPromisePolling(uv_async_t* req, int status) { @@ -213,7 +215,7 @@ Local promise = NanNew(baton->promise); NanCallback* isPendingFn = new NanCallback(promise->Get(NanNew("isPending")).As()); Local argv[1]; // MSBUILD won't assign an array of length 0 - Local isPending = isPendingFn->Call(0, argv)->ToBoolean(); + Local isPending = isPendingFn->Call(promise, 0, argv)->ToBoolean(); if (isPending->Value()) { uv_async_send(&baton->req); @@ -221,11 +223,11 @@ } NanCallback* isFulfilledFn = new NanCallback(promise->Get(NanNew("isFulfilled")).As()); - Local isFulfilled = isFulfilledFn->Call(0, argv)->ToBoolean(); + Local isFulfilled = isFulfilledFn->Call(promise, 0, argv)->ToBoolean(); if (isFulfilled->Value()) { NanCallback* resultFn = new NanCallback(promise->Get(NanNew("value")).As()); - Handle result = resultFn->Call(0, argv); + Handle result = resultFn->Call(promise, 0, argv); {% each field|returnsInfo false true as _return %} if (result.IsEmpty() || result->IsNativeError()) { @@ -258,6 +260,8 @@ baton->result = {{ field.return.error }}; baton->done = false; } + + uv_close((uv_handle_t*) &baton->req, NULL); } {% endif %} {% endif %} From c31ea4e3e5f2209e464f6d38d33752811801dee2 Mon Sep 17 00:00:00 2001 From: Tim Date: Mon, 20 Apr 2015 16:31:16 -0400 Subject: [PATCH 45/60] Shallow clone before mutating the options object --- lib/clone.js | 3 +++ lib/utils/shallow_clone.js | 10 ++++++++++ 2 files changed, 13 insertions(+) create mode 100644 lib/utils/shallow_clone.js diff --git a/lib/clone.js b/lib/clone.js index 6fb2dbade..8efdae739 100644 --- a/lib/clone.js +++ b/lib/clone.js @@ -1,4 +1,5 @@ var NodeGit = require("../"); +var shallowClone = require("./utils/shallow_clone"); var normalizeOptions = NodeGit.Utils.normalizeOptions; var Clone = NodeGit.Clone; @@ -17,7 +18,9 @@ Clone.clone = function(url, local_path, options) { var remoteCallbacks; if (options) { + options = shallowClone(options); remoteCallbacks = options.remoteCallbacks; + delete options.remoteCallbacks; } options = normalizeOptions(options, NodeGit.CloneOptions); diff --git a/lib/utils/shallow_clone.js b/lib/utils/shallow_clone.js new file mode 100644 index 000000000..f93e67523 --- /dev/null +++ b/lib/utils/shallow_clone.js @@ -0,0 +1,10 @@ +module.exports = function(obj) { + var merges = Array.prototype.slice.call(arguments, 1); + + return merges.reduce(function(obj, merge) { + return Object.keys(merge).reduce(function(obj, key) { + obj[key] = merge[key]; + return obj; + }, obj); + }, obj || {}); +}; From 96b39b0c1a2abe888ed3036418d64e256edf1266 Mon Sep 17 00:00:00 2001 From: Tim Date: Mon, 20 Apr 2015 17:02:03 -0400 Subject: [PATCH 46/60] Removed process.exit to prove the process will quit --- test/index.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/index.js b/test/index.js index bde4d989c..c78082e31 100644 --- a/test/index.js +++ b/test/index.js @@ -15,4 +15,4 @@ var args = cov.concat([ "--expose-gc" ]); -fork(bin, args, { cwd: path.join(__dirname, "../") }).on("close", process.exit); +fork(bin, args, { cwd: path.join(__dirname, "../") }); From 04868733c2a156815d5b188cd2b810da6c991b07 Mon Sep 17 00:00:00 2001 From: Brian Leathem Date: Mon, 20 Apr 2015 14:33:01 -0700 Subject: [PATCH 47/60] Removed the superflous "line" argument --- generate/input/callbacks.json | 4 ---- 1 file changed, 4 deletions(-) diff --git a/generate/input/callbacks.json b/generate/input/callbacks.json index 708edc27e..d9f0af8d9 100644 --- a/generate/input/callbacks.json +++ b/generate/input/callbacks.json @@ -180,10 +180,6 @@ "name": "hunk", "cType": "const git_diff_hunk *" }, - { - "name": "line", - "cType": "const git_diff_line *" - }, { "name": "payload", "cType": "void *" From b294842d90665ee98ebebea9f7c52e39142e10ff Mon Sep 17 00:00:00 2001 From: Brian Leathem Date: Mon, 20 Apr 2015 16:55:45 -0700 Subject: [PATCH 48/60] An initial wrapper for git_diff_blob_to_buffer --- generate/input/descriptor.json | 5 ++++- lib/diff.js | 7 +++++++ test/tests/diff.js | 24 ++++++++++++++++++++++++ 3 files changed, 35 insertions(+), 1 deletion(-) diff --git a/generate/input/descriptor.json b/generate/input/descriptor.json index 90b06ed4a..99bc5f0a3 100644 --- a/generate/input/descriptor.json +++ b/generate/input/descriptor.json @@ -524,7 +524,10 @@ ], "functions": { "git_diff_blob_to_buffer": { - "ignore": true + "return": { + "isErrorCode": true + }, + "isAsync": true }, "git_diff_blobs": { "ignore": true diff --git a/lib/diff.js b/lib/diff.js index 4761dfdfd..425e9cd35 100644 --- a/lib/diff.js +++ b/lib/diff.js @@ -62,3 +62,10 @@ Diff.prototype.findSimilar = function(opts) { opts = normalizeOptions(opts, NodeGit.DiffFindOptions); return findSimilar.call(this, opts); }; + +var blobToBuffer = Diff.prototype.blobToBuffer; +Diff.prototype.blobToBuffer = function(old_blob, old_as_path, buffer, buffer_length, buffer_as_path, opts, file_cb, hunk_cb, line_cb) { + console.log("********************************"); + opts = normalizeOptions(opts, NodeGit.DiffOptions); + return blobToBuffer.call(this, old_blob, old_as_path, buffer, buffer_length, buffer_as_path, opts, file_cb, hunk_cb, line_cb); +}; diff --git a/test/tests/diff.js b/test/tests/diff.js index dd8f6d8d8..7ed6360f6 100644 --- a/test/tests/diff.js +++ b/test/tests/diff.js @@ -145,6 +145,30 @@ describe("Diff", function() { }); }); + it("can diff the contents of a file to the index", function(done) { + this.repository.getBranchCommit("master") + .then(function(commit) { + var difffile = "LICENSE"; + return commit.getEntry(difffile); + }) + .then(function(entry) { + var _entry = entry; + return _entry.getBlob(); + }) + .then(function(blob) { + var buffer = "New Text"; + console.log(buffer, buffer.length); + Diff.blobToBuffer(blob, null, buffer, buffer.length, null, null, null, function() { + console.log('delta'); + done(); + }, null, null); + }, function(error) { + console.log('Error', error); + throw new Error(error); + }) + + }); + it("can diff with a null tree", function() { var repo = this.repository; var tree = this.masterCommitTree; From a0a16540d5c3c882200f865a095c8a07f3103d82 Mon Sep 17 00:00:00 2001 From: John Haley Date: Mon, 20 Apr 2015 21:29:36 -0700 Subject: [PATCH 49/60] Fix up `Diff.blobToBuffer` --- generate/input/descriptor.json | 29 +++++++++++++++++++++++++++++ lib/diff.js | 29 +++++++++++++++++++++++++---- test/tests/diff.js | 26 +++++++++++++------------- 3 files changed, 67 insertions(+), 17 deletions(-) diff --git a/generate/input/descriptor.json b/generate/input/descriptor.json index 99bc5f0a3..05938ae73 100644 --- a/generate/input/descriptor.json +++ b/generate/input/descriptor.json @@ -524,6 +524,35 @@ ], "functions": { "git_diff_blob_to_buffer": { + "args": { + "old_blob" : { + "isOptional": true + }, + "old_as_path" : { + "isOptional": true + }, + "buffer" : { + "isOptional": true + }, + "buffer_len" : { + "isOptional": true + }, + "buffer_as_path" : { + "isOptional": true + }, + "options" : { + "isOptional": true + }, + "file_cb" : { + "isOptional": true + }, + "hunk_cb" : { + "isOptional": true + }, + "line_cb" : { + "isOptional": true + } + }, "return": { "isErrorCode": true }, diff --git a/lib/diff.js b/lib/diff.js index 425e9cd35..91f72d168 100644 --- a/lib/diff.js +++ b/lib/diff.js @@ -63,9 +63,30 @@ Diff.prototype.findSimilar = function(opts) { return findSimilar.call(this, opts); }; -var blobToBuffer = Diff.prototype.blobToBuffer; -Diff.prototype.blobToBuffer = function(old_blob, old_as_path, buffer, buffer_length, buffer_as_path, opts, file_cb, hunk_cb, line_cb) { - console.log("********************************"); +var blobToBuffer = Diff.blobToBuffer; +Diff.blobToBuffer= function( + old_blob, + old_as_path, + buffer, + buffer_as_path, + opts, + file_cb, + hunk_cb, + line_cb) { + var bufferLength = !buffer ? 0 : buffer.length; + opts = normalizeOptions(opts, NodeGit.DiffOptions); - return blobToBuffer.call(this, old_blob, old_as_path, buffer, buffer_length, buffer_as_path, opts, file_cb, hunk_cb, line_cb); + + return blobToBuffer.call( + this, + old_blob, + old_as_path, + buffer, + bufferLength, + buffer_as_path, + opts, + file_cb, + hunk_cb, + line_cb, + null); }; diff --git a/test/tests/diff.js b/test/tests/diff.js index 7ed6360f6..c00d89880 100644 --- a/test/tests/diff.js +++ b/test/tests/diff.js @@ -145,11 +145,10 @@ describe("Diff", function() { }); }); - it("can diff the contents of a file to the index", function(done) { + it("can diff the contents of a file to a string", function(done) { this.repository.getBranchCommit("master") .then(function(commit) { - var difffile = "LICENSE"; - return commit.getEntry(difffile); + return commit.getEntry("LICENSE"); }) .then(function(entry) { var _entry = entry; @@ -157,16 +156,17 @@ describe("Diff", function() { }) .then(function(blob) { var buffer = "New Text"; - console.log(buffer, buffer.length); - Diff.blobToBuffer(blob, null, buffer, buffer.length, null, null, null, function() { - console.log('delta'); - done(); - }, null, null); - }, function(error) { - console.log('Error', error); - throw new Error(error); - }) - + return Diff.blobToBuffer( + blob, + null, + buffer, + null, + null, + null, + function() { + console.log("delta"); + }); + }); }); it("can diff with a null tree", function() { From 75cbff0dbff910e1769de43ce33a6474a30edbe1 Mon Sep 17 00:00:00 2001 From: Brian Leathem Date: Mon, 20 Apr 2015 23:53:56 -0700 Subject: [PATCH 50/60] Added a test for `Diff.blobToBuffer` --- test/tests/diff.js | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/test/tests/diff.js b/test/tests/diff.js index c00d89880..66ab6b1c9 100644 --- a/test/tests/diff.js +++ b/test/tests/diff.js @@ -163,8 +163,16 @@ describe("Diff", function() { null, null, null, - function() { - console.log("delta"); + function(delta, hunk, payload) { + assert.equal(hunk.oldStart(), 1); + assert.equal(hunk.oldLines(), 19); + assert.equal(hunk.newStart(), 1); + assert.equal(hunk.newLines(), 1); + assert.equal( + hunk.header().substring(0, hunk.headerLen() - 1), + "@@ -1,19 +1 @@" + ); + done(); }); }); }); From 3bd457d4f8bf112396f04ffb1cafb02b99893ef6 Mon Sep 17 00:00:00 2001 From: John Haley Date: Wed, 22 Apr 2015 20:57:26 -0700 Subject: [PATCH 51/60] Update cloneFromGithubWith2Factor.js Removed duplicate variable declaration --- examples/cloneFromGithubWith2Factor.js | 2 -- 1 file changed, 2 deletions(-) diff --git a/examples/cloneFromGithubWith2Factor.js b/examples/cloneFromGithubWith2Factor.js index 8c8ca0829..20cda9a46 100644 --- a/examples/cloneFromGithubWith2Factor.js +++ b/examples/cloneFromGithubWith2Factor.js @@ -19,8 +19,6 @@ var repoUrl = "https://" + token + repoOwner + "/" + repoName + ".git"; -var opts = { ignoreCertErrors: 1}; - // If the repo is public, you can use a callback instead var repoUrl = "https://github.com/" + repoOwner + "/" + repoName + ".git"; From 267c7e5a9c89335e63cbdb3784a58e04210d39b9 Mon Sep 17 00:00:00 2001 From: Will James Date: Mon, 27 Apr 2015 16:54:44 +1000 Subject: [PATCH 52/60] There is an incompatibility with NaN 1.8.x, keeping 1.7.x for now. --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 7bb119786..9d95f04db 100644 --- a/package.json +++ b/package.json @@ -70,7 +70,7 @@ "lcov-result-merger": "^1.0.2", "lodash": "^3.1.0", "mocha": "~2.1.0", - "nan": "^1.7.0", + "nan": "~1.7.0", "nw-gyp": "^0.12.4", "pangyp": "^2.1.0", "request": "^2.53.0", From aa6a7edd9681f484e4dcfb41259bfd20c61d1c06 Mon Sep 17 00:00:00 2001 From: Tim Branyen Date: Mon, 20 Apr 2015 19:04:42 -0400 Subject: [PATCH 53/60] Bump version and update dependencies --- README.md | 2 +- package.json | 38 +++++++++++++++++++------------------- 2 files changed, 20 insertions(+), 20 deletions(-) diff --git a/README.md b/README.md index aba7d7a4e..f01f8710a 100644 --- a/README.md +++ b/README.md @@ -31,7 +31,7 @@ NodeGit -**Stable: 0.3.3** +**Stable: 0.4.0** ## Have a problem? Come chat with us! ## diff --git a/package.json b/package.json index 9d95f04db..21a397177 100644 --- a/package.json +++ b/package.json @@ -1,19 +1,19 @@ { "name": "nodegit", "description": "Node.js libgit2 asynchronous native bindings", - "version": "0.3.3", + "version": "0.4.0", "libgit2": { "url": "https://github.com/libgit2/libgit2/tarball/fb6df50b7f250a4fd8b2fab257f119a5185e9bf5", "sha": "fb6df50b7f250a4fd8b2fab257f119a5185e9bf5", "version": "0.22.2" }, "libssh2": { - "url": "http://www.libssh2.org/download/libssh2-1.4.3.tar.gz", - "version": "1.4.3" + "url": "http://www.libssh2.org/download/libssh2-1.5.0.tar.gz", + "version": "1.5.0" }, "http_parser": { - "url": "https://github.com/joyent/http-parser/archive/v2.3.tar.gz", - "version": "2.3.0", + "url": "https://github.com/joyent/http-parser/archive/v2.4.2.tar.gz", + "version": "2.4.2", "0.10": { "url": "https://github.com/joyent/http-parser/archive/v2.0.tar.gz", "version": "2.0.0" @@ -54,27 +54,27 @@ "node-pre-gyp" ], "dependencies": { - "fs-extra": "^0.16.3", - "node-pre-gyp": "^0.6.2", - "nodegit-promise": "^2.0.0", - "npm": "^2.5.0", + "fs-extra": "^0.18.2", + "node-pre-gyp": "^0.6.4", + "nodegit-promise": "^2.0.1", + "npm": "^2.8.3", "promisify-node": "^0.1.5", - "which-native-nodish": "^1.0.3" + "which-native-nodish": "^1.1.1" }, "devDependencies": { - "combyne": "^0.6.5", + "combyne": "^0.7.0", "coveralls": "^2.11.2", - "istanbul": "^0.3.5", - "js-beautify": "^1.5.4", - "jshint": "^2.6.0", + "istanbul": "^0.3.13", + "js-beautify": "^1.5.5", + "jshint": "^2.7.0", "lcov-result-merger": "^1.0.2", - "lodash": "^3.1.0", - "mocha": "~2.1.0", - "nan": "~1.7.0", + "lodash": "^3.7.0", + "mocha": "^2.2.4", + "nan": "^1.7.0", "nw-gyp": "^0.12.4", "pangyp": "^2.1.0", - "request": "^2.53.0", - "tar": "^1.0.3" + "request": "^2.55.0", + "tar": "^2.1.0" }, "binary": { "module_name": "nodegit", From 356fe1a5b12da07b6356b8d4ea1f52e994aad815 Mon Sep 17 00:00:00 2001 From: Tim Branyen Date: Tue, 21 Apr 2015 01:06:56 -0400 Subject: [PATCH 54/60] Revert Combyne has regression in 0.7.0 Also made it easier to update third party packages based on current NODE_VERSION. --- lifecycleScripts/checkPrepared.js | 4 ++-- lifecycleScripts/retrieveExternalDependencies.js | 4 ++-- package.json | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/lifecycleScripts/checkPrepared.js b/lifecycleScripts/checkPrepared.js index ffb1a5c28..ec3d3da43 100644 --- a/lifecycleScripts/checkPrepared.js +++ b/lifecycleScripts/checkPrepared.js @@ -36,8 +36,8 @@ function checkVendor(name, skipVersion) { var version = ""; if (!skipVersion) { var vendorPackage = pkg[name]; - if (NODE_VERSION === 0.1 && vendorPackage["0.10"]) { - vendorPackage = vendorPackage["0.10"]; + if (vendorPackage[NODE_VERSION]) { + vendorPackage = vendorPackage[NODE_VERSION]; } version = vendorPackage.sha || vendorPackage.version; } diff --git a/lifecycleScripts/retrieveExternalDependencies.js b/lifecycleScripts/retrieveExternalDependencies.js index 8e0d7edce..58f91965a 100644 --- a/lifecycleScripts/retrieveExternalDependencies.js +++ b/lifecycleScripts/retrieveExternalDependencies.js @@ -29,8 +29,8 @@ module.exports = function retrieveExternalDependencies() { function getVendorLib(name) { var vendorPath = "vendor/" + name + "/"; var vendorPackage = pkg[name]; - if (NODE_VERSION === 0.1 && vendorPackage["0.10"]) { - vendorPackage = vendorPackage["0.10"]; + if (vendorPackage[NODE_VERSION]) { + vendorPackage = vendorPackage[NODE_VERSION]; } var version = vendorPackage.sha || vendorPackage.version; diff --git a/package.json b/package.json index 21a397177..d4bdc9d36 100644 --- a/package.json +++ b/package.json @@ -14,7 +14,7 @@ "http_parser": { "url": "https://github.com/joyent/http-parser/archive/v2.4.2.tar.gz", "version": "2.4.2", - "0.10": { + "0.1": { "url": "https://github.com/joyent/http-parser/archive/v2.0.tar.gz", "version": "2.0.0" } @@ -62,7 +62,7 @@ "which-native-nodish": "^1.1.1" }, "devDependencies": { - "combyne": "^0.7.0", + "combyne": "^0.6.5", "coveralls": "^2.11.2", "istanbul": "^0.3.13", "js-beautify": "^1.5.5", From 6d7848d4515826cccdee1e4baa6b1047a7bf0552 Mon Sep 17 00:00:00 2001 From: Tim Branyen Date: Sun, 3 May 2015 03:25:14 -0400 Subject: [PATCH 55/60] Removed try/catch for generation, bumped nan --- generate/scripts/generateNativeCode.js | 21 +++++++-------------- package.json | 2 +- 2 files changed, 8 insertions(+), 15 deletions(-) diff --git a/generate/scripts/generateNativeCode.js b/generate/scripts/generateNativeCode.js index 4e2884c1b..a8efec20d 100644 --- a/generate/scripts/generateNativeCode.js +++ b/generate/scripts/generateNativeCode.js @@ -110,20 +110,13 @@ module.exports = function generateNativeCode() { utils.writeFile("../lib/nodegit.js", beautify(templates.nodegitJS.render(enabled))); // Write out all the classes. enabled.forEach(function(idef) { - try { - if (idef.type && idef.type != "enum") { - utils.writeFile( - "../src/" + idef.filename + ".cc", templates[idef.type + "_content"].render(idef) - ); - utils.writeFile( - "../include/" + idef.filename + ".h", templates[idef.type + "_header"].render(idef) - ); - } - } - catch (e) { - if (process.env.BUILD_ONLY) { - console.error(e); - } + if (idef.type && idef.type != "enum") { + utils.writeFile( + "../src/" + idef.filename + ".cc", templates[idef.type + "_content"].render(idef) + ); + utils.writeFile( + "../include/" + idef.filename + ".h", templates[idef.type + "_header"].render(idef) + ); } }); diff --git a/package.json b/package.json index d4bdc9d36..c0825958b 100644 --- a/package.json +++ b/package.json @@ -70,7 +70,7 @@ "lcov-result-merger": "^1.0.2", "lodash": "^3.7.0", "mocha": "^2.2.4", - "nan": "^1.7.0", + "nan": "^1.8.4", "nw-gyp": "^0.12.4", "pangyp": "^2.1.0", "request": "^2.55.0", From 46d0369893383fe682cd829d2c6fa861aa5fccad Mon Sep 17 00:00:00 2001 From: Tim Branyen Date: Sun, 3 May 2015 03:39:51 -0400 Subject: [PATCH 56/60] Bumped latest dependencies --- package.json | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/package.json b/package.json index c0825958b..5da81678b 100644 --- a/package.json +++ b/package.json @@ -55,20 +55,20 @@ ], "dependencies": { "fs-extra": "^0.18.2", - "node-pre-gyp": "^0.6.4", + "node-pre-gyp": "^0.6.5", "nodegit-promise": "^2.0.1", - "npm": "^2.8.3", + "npm": "^2.9.0", "promisify-node": "^0.1.5", "which-native-nodish": "^1.1.1" }, "devDependencies": { - "combyne": "^0.6.5", + "combyne": "^0.8.0", "coveralls": "^2.11.2", "istanbul": "^0.3.13", "js-beautify": "^1.5.5", "jshint": "^2.7.0", "lcov-result-merger": "^1.0.2", - "lodash": "^3.7.0", + "lodash": "^3.8.0", "mocha": "^2.2.4", "nan": "^1.8.4", "nw-gyp": "^0.12.4", From 7baa3381c2cd40ef2ccb456aaae71b701aaa4803 Mon Sep 17 00:00:00 2001 From: John Haley Date: Tue, 5 May 2015 16:52:38 -0700 Subject: [PATCH 57/60] Explicitly use `nodegit.node` when requiring native module Some things that override node's `require` (e.g. jest) might break when including nodegit since. This is a workaround until they fix that. I made an issue at https://github.com/facebook/jest/issues/353 --- generate/templates/templates/nodegit.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/generate/templates/templates/nodegit.js b/generate/templates/templates/nodegit.js index 99e2b4a0a..c67fae9b6 100644 --- a/generate/templates/templates/nodegit.js +++ b/generate/templates/templates/nodegit.js @@ -5,7 +5,7 @@ var rawApi; // Attempt to load the production release first, if it fails fall back to the // debug release. try { - rawApi = require("../build/Release/nodegit"); + rawApi = require("../build/Release/nodegit.node"); } catch (ex) { /* istanbul ignore next */ @@ -13,7 +13,7 @@ catch (ex) { throw ex; } - rawApi = require("../build/Debug/nodegit"); + rawApi = require("../build/Debug/nodegit.node"); } // Native methods do not return an identifiable function, so we From 1b7dddbd4fc981a305723f5bb1f61b824a8deec3 Mon Sep 17 00:00:00 2001 From: John Haley Date: Wed, 6 May 2015 08:47:59 -0700 Subject: [PATCH 58/60] Downgraded nan to stop build breaking nan ^1.8.0 breaks electron :( --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 5da81678b..f512b0d29 100644 --- a/package.json +++ b/package.json @@ -70,7 +70,7 @@ "lcov-result-merger": "^1.0.2", "lodash": "^3.8.0", "mocha": "^2.2.4", - "nan": "^1.8.4", + "nan": "~1.7.0", "nw-gyp": "^0.12.4", "pangyp": "^2.1.0", "request": "^2.55.0", From 80396454f9b528f1c8ceeda8070bbc7fd86cc2fd Mon Sep 17 00:00:00 2001 From: Tim Branyen Date: Thu, 7 May 2015 15:59:30 -0400 Subject: [PATCH 59/60] Updated changelog --- CHANGELOG.md | 340 +++++++++++++++++++++++++++++---------------------- 1 file changed, 192 insertions(+), 148 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 20ae4e40e..2b0f8e094 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,24 +2,178 @@ ## [Unreleased](https://github.com/nodegit/nodegit/tree/HEAD) -[Full Changelog](https://github.com/nodegit/nodegit/compare/v0.2.7...HEAD) +[Full Changelog](https://github.com/nodegit/nodegit/compare/v0.3.3...HEAD) **Closed issues:** +- Error installing nodegit as dependency of an atom-shell app [\#556](https://github.com/nodegit/nodegit/issues/556) + +- New version of nan is breaking compile [\#554](https://github.com/nodegit/nodegit/issues/554) + +- Install error from openssl [\#551](https://github.com/nodegit/nodegit/issues/551) + +- How to get Tag instance by tag\_name? [\#543](https://github.com/nodegit/nodegit/issues/543) + +- ELIFECYCLE Error on install [\#540](https://github.com/nodegit/nodegit/issues/540) + +- Remote.delete returns -3 [\#539](https://github.com/nodegit/nodegit/issues/539) + +- Repository.init should accept boolean value for is\_bare [\#538](https://github.com/nodegit/nodegit/issues/538) + +- getStatus hangs [\#537](https://github.com/nodegit/nodegit/issues/537) + +- Unable to compile or install with npm install nodegit [\#536](https://github.com/nodegit/nodegit/issues/536) + +- `options` not reusable, nodegit destroys it [\#533](https://github.com/nodegit/nodegit/issues/533) + +- 'Error: 'directory' exists and is not an empty directory' \(but it doesn't exist\) [\#530](https://github.com/nodegit/nodegit/issues/530) + +- hey !:-\) problem with Branch.iteratorNew \(support\) [\#528](https://github.com/nodegit/nodegit/issues/528) + +- hey !:-\) problem with Branch.iteratorNew [\#527](https://github.com/nodegit/nodegit/issues/527) + +- hey !:-\) problem with Branch.iteratorNew [\#526](https://github.com/nodegit/nodegit/issues/526) + +- hey !:-\) problem with Branch.iteratorNew [\#525](https://github.com/nodegit/nodegit/issues/525) + +- Error: Reference 'refs/remotes/user/foo/HEAD' not found [\#523](https://github.com/nodegit/nodegit/issues/523) + +- Path issues windows [\#522](https://github.com/nodegit/nodegit/issues/522) + +- Issues on scientific linux 6.6 [\#521](https://github.com/nodegit/nodegit/issues/521) + +- It's looking for node-typ under `/Users/johnh/.node-gyp` [\#518](https://github.com/nodegit/nodegit/issues/518) + +- Not working with iojs [\#516](https://github.com/nodegit/nodegit/issues/516) + +- Cred.sshKeyNew not working: Too many redirects or authentication replays [\#511](https://github.com/nodegit/nodegit/issues/511) + +- Open a Repo from a subfolder [\#509](https://github.com/nodegit/nodegit/issues/509) + +- Create git-like CLI [\#508](https://github.com/nodegit/nodegit/issues/508) + +- Cannot create an instance of Packbuilder [\#507](https://github.com/nodegit/nodegit/issues/507) + +- Cannot find module '../build/Debug/nodegit' [\#506](https://github.com/nodegit/nodegit/issues/506) + +- Bug with oid implicit cast inside C++ [\#501](https://github.com/nodegit/nodegit/issues/501) + +- Failed to `require` on Ubuntu 12.04LTS [\#493](https://github.com/nodegit/nodegit/issues/493) + +- Enable `git\_config` [\#449](https://github.com/nodegit/nodegit/issues/449) + +- Pull example doesn't fully update the index [\#389](https://github.com/nodegit/nodegit/issues/389) + +**Merged pull requests:** + +- There is an incompatibility with NaN 1.8.x, keeping 1.7.x for now. [\#552](https://github.com/nodegit/nodegit/pull/552) ([wiggzz](https://github.com/wiggzz)) + +- A wrapper for git\_diff\_blob\_to\_buffer [\#550](https://github.com/nodegit/nodegit/pull/550) ([bleathem](https://github.com/bleathem)) + +- A wrapper for git\_diff\_blob\_to\_buffer [\#549](https://github.com/nodegit/nodegit/pull/549) ([bleathem](https://github.com/bleathem)) + +- Removed the superflous "line" argument [\#547](https://github.com/nodegit/nodegit/pull/547) ([bleathem](https://github.com/bleathem)) + +- This fixes polling sync promises in callbacks. [\#546](https://github.com/nodegit/nodegit/pull/546) ([johnhaley81](https://github.com/johnhaley81)) + +- Add get/set config string methods and tests [\#545](https://github.com/nodegit/nodegit/pull/545) ([johnhaley81](https://github.com/johnhaley81)) + +- Make `Remote.delete` async and return error messages correctly [\#544](https://github.com/nodegit/nodegit/pull/544) ([johnhaley81](https://github.com/johnhaley81)) + +- Bump "nodegit-promise" version [\#542](https://github.com/nodegit/nodegit/pull/542) ([johnhaley81](https://github.com/johnhaley81)) + +- Introduced a new ConvenientLine class to wrap the lines returned from ConvenientHunk. [\#541](https://github.com/nodegit/nodegit/pull/541) ([bleathem](https://github.com/bleathem)) + +- Fix some things missed by the generating scripts [\#535](https://github.com/nodegit/nodegit/pull/535) ([johnhaley81](https://github.com/johnhaley81)) + +- Attempt remove the delete keyword [\#534](https://github.com/nodegit/nodegit/pull/534) ([tbranyen](https://github.com/tbranyen)) + +- Fix freeing a `GitOid` that was passed as a string [\#531](https://github.com/nodegit/nodegit/pull/531) ([johnhaley81](https://github.com/johnhaley81)) + +- fix typo: "byes" [\#529](https://github.com/nodegit/nodegit/pull/529) ([rutsky](https://github.com/rutsky)) + +- Add convenience methods to status file [\#524](https://github.com/nodegit/nodegit/pull/524) ([maxkorp](https://github.com/maxkorp)) + +- Lots of complaints of missing build/Debug/nodegit [\#520](https://github.com/nodegit/nodegit/pull/520) ([tbranyen](https://github.com/tbranyen)) + +- Add `Graph.aheadBehind` and tests [\#517](https://github.com/nodegit/nodegit/pull/517) ([johnhaley81](https://github.com/johnhaley81)) + +- Update to use libgit2 v0.22.2 [\#515](https://github.com/nodegit/nodegit/pull/515) ([johnhaley81](https://github.com/johnhaley81)) + +- Add `Repository.prototype.fetchheadForeach` and tests [\#514](https://github.com/nodegit/nodegit/pull/514) ([johnhaley81](https://github.com/johnhaley81)) + +- Converted create methods to be synchronous [\#513](https://github.com/nodegit/nodegit/pull/513) ([tbranyen](https://github.com/tbranyen)) + +- Fix atom-shell build on windows [\#512](https://github.com/nodegit/nodegit/pull/512) ([johnhaley81](https://github.com/johnhaley81)) + +- Update Checkout and Merge [\#505](https://github.com/nodegit/nodegit/pull/505) ([orderedlist](https://github.com/orderedlist)) + +- Add note tests [\#504](https://github.com/nodegit/nodegit/pull/504) ([tbranyen](https://github.com/tbranyen)) + +- Revert "Guide navigation is currently confusing" [\#503](https://github.com/nodegit/nodegit/pull/503) ([thgaskell](https://github.com/thgaskell)) + +- Improve coverage [\#502](https://github.com/nodegit/nodegit/pull/502) ([tbranyen](https://github.com/tbranyen)) + +- Adds in CPP code coverage and joined JS [\#499](https://github.com/nodegit/nodegit/pull/499) ([tbranyen](https://github.com/tbranyen)) + +- Add twitter username to README.md [\#498](https://github.com/nodegit/nodegit/pull/498) ([johnhaley81](https://github.com/johnhaley81)) + +- Fix symbolic reference handling in getReferences [\#496](https://github.com/nodegit/nodegit/pull/496) ([billt2006](https://github.com/billt2006)) + +- Enable `git\_stash\_foreach` [\#495](https://github.com/nodegit/nodegit/pull/495) ([johnhaley81](https://github.com/johnhaley81)) + +- Guide navigation is currently confusing [\#494](https://github.com/nodegit/nodegit/pull/494) ([tbranyen](https://github.com/tbranyen)) + +- Fix gitter badge for npm [\#492](https://github.com/nodegit/nodegit/pull/492) ([billt2006](https://github.com/billt2006)) + +- Add automatically generated change log file. [\#465](https://github.com/nodegit/nodegit/pull/465) ([skywinder](https://github.com/skywinder)) + +## [v0.3.3](https://github.com/nodegit/nodegit/tree/v0.3.3) (2015-03-16) + +[Full Changelog](https://github.com/nodegit/nodegit/compare/v0.3.2...v0.3.3) + +**Merged pull requests:** + +- Download all dev dependencies before build [\#491](https://github.com/nodegit/nodegit/pull/491) ([johnhaley81](https://github.com/johnhaley81)) + +## [v0.3.2](https://github.com/nodegit/nodegit/tree/v0.3.2) (2015-03-16) + +[Full Changelog](https://github.com/nodegit/nodegit/compare/v0.3.1...v0.3.2) + +**Closed issues:** + +- Amazon S3 CDN link is broken [\#482](https://github.com/nodegit/nodegit/issues/482) + +**Merged pull requests:** + +- Confirm builder exists before building [\#490](https://github.com/nodegit/nodegit/pull/490) ([johnhaley81](https://github.com/johnhaley81)) + +## [v0.3.1](https://github.com/nodegit/nodegit/tree/v0.3.1) (2015-03-14) + +[Full Changelog](https://github.com/nodegit/nodegit/compare/v0.3.0...v0.3.1) + +**Merged pull requests:** + +- Revert node-pre-gyp to install not build [\#486](https://github.com/nodegit/nodegit/pull/486) ([tbranyen](https://github.com/tbranyen)) + +## [v0.3.0](https://github.com/nodegit/nodegit/tree/v0.3.0) (2015-03-13) + +[Full Changelog](https://github.com/nodegit/nodegit/compare/v0.2.7...v0.3.0) + +**Closed issues:** + +- Push [\#463](https://github.com/nodegit/nodegit/issues/463) + - Suppress astyle errors [\#459](https://github.com/nodegit/nodegit/issues/459) - io.js support [\#447](https://github.com/nodegit/nodegit/issues/447) - Meteor: icon fonts not working \(Resource interpreted as Font but transferred with MIME type text/html\) [\#443](https://github.com/nodegit/nodegit/issues/443) -- Don't let users set the payloads through JS [\#436](https://github.com/nodegit/nodegit/issues/436) - -- Transfer callback stats are being converted wrong [\#432](https://github.com/nodegit/nodegit/issues/432) +- AnnotatedCommit.x listing as Annotated.commitX [\#437](https://github.com/nodegit/nodegit/issues/437) - fetchAll\(\) fails unless a default signature is available [\#431](https://github.com/nodegit/nodegit/issues/431) -- Push example needs to be updated [\#429](https://github.com/nodegit/nodegit/issues/429) - - Question: Is there a certificateCheck option available for pushing to a remote repository? [\#420](https://github.com/nodegit/nodegit/issues/420) - Repository.open returns empty object [\#412](https://github.com/nodegit/nodegit/issues/412) @@ -38,8 +192,6 @@ - Subtrees + custom error handling [\#400](https://github.com/nodegit/nodegit/issues/400) -- Callbacks need to handle more use-cases [\#395](https://github.com/nodegit/nodegit/issues/395) - - How to use nodegit in atom shell ..... [\#393](https://github.com/nodegit/nodegit/issues/393) - Cannot create a new branch [\#391](https://github.com/nodegit/nodegit/issues/391) @@ -50,40 +202,58 @@ - Rename combyne folder to templates [\#378](https://github.com/nodegit/nodegit/issues/378) -- Building for atom-shell v0.21.0 fails [\#376](https://github.com/nodegit/nodegit/issues/376) - - Cloning SSH repos seem to fail [\#372](https://github.com/nodegit/nodegit/issues/372) - Commit.getDiff is backwards? [\#368](https://github.com/nodegit/nodegit/issues/368) - List all files in repo \(git ls-tree\) [\#365](https://github.com/nodegit/nodegit/issues/365) -- Cloning locks up when more than 3 at the same time. [\#364](https://github.com/nodegit/nodegit/issues/364) - - Checking out a branch [\#361](https://github.com/nodegit/nodegit/issues/361) - nodegit no longer builds in nwjs [\#360](https://github.com/nodegit/nodegit/issues/360) -- Update to v0.22 of libgit2 [\#355](https://github.com/nodegit/nodegit/issues/355) - - Module install/build fails on Heroku [\#332](https://github.com/nodegit/nodegit/issues/332) - 2 Step Authentication [\#323](https://github.com/nodegit/nodegit/issues/323) -- Needed Examples for 0.3.0 [\#321](https://github.com/nodegit/nodegit/issues/321) +**Merged pull requests:** -- Tests randomly failing in AppVeyor [\#316](https://github.com/nodegit/nodegit/issues/316) +- Rename `Annotated` to `AnnotatedCommit` [\#485](https://github.com/nodegit/nodegit/pull/485) ([johnhaley81](https://github.com/johnhaley81)) -- Start using prepublishing to fix dependencies [\#301](https://github.com/nodegit/nodegit/issues/301) +- Bump version to 0.3.0 [\#484](https://github.com/nodegit/nodegit/pull/484) ([johnhaley81](https://github.com/johnhaley81)) -- Get commits history only for a file [\#220](https://github.com/nodegit/nodegit/issues/220) +- Remove unneeded connect call from push example [\#483](https://github.com/nodegit/nodegit/pull/483) ([johnhaley81](https://github.com/johnhaley81)) -- enable Index.addAll and related [\#131](https://github.com/nodegit/nodegit/issues/131) +- Update push example [\#481](https://github.com/nodegit/nodegit/pull/481) ([billt2006](https://github.com/billt2006)) -**Merged pull requests:** +- Fix trailing space in atom-shell windows install [\#480](https://github.com/nodegit/nodegit/pull/480) ([johnhaley81](https://github.com/johnhaley81)) + +- Fix atom-shell install on windows [\#479](https://github.com/nodegit/nodegit/pull/479) ([johnhaley81](https://github.com/johnhaley81)) + +- Updated API documentation link to work with NPM's markdown renderer. [\#477](https://github.com/nodegit/nodegit/pull/477) ([hughfdjackson](https://github.com/hughfdjackson)) + +- Add option to `fetch` to prune the remote afterwards [\#476](https://github.com/nodegit/nodegit/pull/476) ([johnhaley81](https://github.com/johnhaley81)) + +- Make index.addAll use status to increase performance [\#475](https://github.com/nodegit/nodegit/pull/475) ([maxkorp](https://github.com/maxkorp)) + +- Add defaults to `Remote.prototype.push` [\#474](https://github.com/nodegit/nodegit/pull/474) ([johnhaley81](https://github.com/johnhaley81)) + +- Fix `createCommitOnHead` [\#473](https://github.com/nodegit/nodegit/pull/473) ([johnhaley81](https://github.com/johnhaley81)) + +- Move guides around to remove subindexes [\#472](https://github.com/nodegit/nodegit/pull/472) ([orderedlist](https://github.com/orderedlist)) + +- Put `Remote.Push` on the remote prototype [\#470](https://github.com/nodegit/nodegit/pull/470) ([johnhaley81](https://github.com/johnhaley81)) + +- Change Repository.prototype.setHead to be asynchronous [\#469](https://github.com/nodegit/nodegit/pull/469) ([jrbalsano](https://github.com/jrbalsano)) + +- Test in Node 0.12 and io.js [\#468](https://github.com/nodegit/nodegit/pull/468) ([tbranyen](https://github.com/tbranyen)) + +- Add checkoutBranch convenience method [\#466](https://github.com/nodegit/nodegit/pull/466) ([johnhaley81](https://github.com/johnhaley81)) - Don't assign enums to \_\_proto\_\_ [\#464](https://github.com/nodegit/nodegit/pull/464) ([orderedlist](https://github.com/orderedlist)) +- Fix push example [\#462](https://github.com/nodegit/nodegit/pull/462) ([johnhaley81](https://github.com/johnhaley81)) + - Adds support for strarray in structs [\#461](https://github.com/nodegit/nodegit/pull/461) ([orderedlist](https://github.com/orderedlist)) - supress astyle warnings [\#460](https://github.com/nodegit/nodegit/pull/460) ([maxkorp](https://github.com/maxkorp)) @@ -118,14 +288,10 @@ - Put `uv\_async\_init` on main thread [\#438](https://github.com/nodegit/nodegit/pull/438) ([johnhaley81](https://github.com/johnhaley81)) -- Fix libuv threading issue [\#435](https://github.com/nodegit/nodegit/pull/435) ([johnhaley81](https://github.com/johnhaley81)) - - Automatically free repositories post clone [\#434](https://github.com/nodegit/nodegit/pull/434) ([tbranyen](https://github.com/tbranyen)) - Skip transfer progress test until it's fixed [\#433](https://github.com/nodegit/nodegit/pull/433) ([johnhaley81](https://github.com/johnhaley81)) -- git\_create\_tag doesn't have the correct descriptor [\#430](https://github.com/nodegit/nodegit/pull/430) ([mattyclarkson](https://github.com/mattyclarkson)) - - Change environment to default for upgraded service [\#428](https://github.com/nodegit/nodegit/pull/428) ([maxkorp](https://github.com/maxkorp)) - Make the `git\_remote\_push` function async [\#427](https://github.com/nodegit/nodegit/pull/427) ([johnhaley81](https://github.com/johnhaley81)) @@ -146,6 +312,8 @@ - Update jsdoc and ignore some methods [\#418](https://github.com/nodegit/nodegit/pull/418) ([orderedlist](https://github.com/orderedlist)) +- Converting Examples to Guides [\#417](https://github.com/nodegit/nodegit/pull/417) ([tbranyen](https://github.com/tbranyen)) + - Fix callbacks with just return value and single payload [\#416](https://github.com/nodegit/nodegit/pull/416) ([johnhaley81](https://github.com/johnhaley81)) - Add `git\_reset` and `git\_reset\_default` [\#415](https://github.com/nodegit/nodegit/pull/415) ([johnhaley81](https://github.com/johnhaley81)) @@ -234,10 +402,6 @@ - Can't require nodegit without building it explicitly [\#340](https://github.com/nodegit/nodegit/issues/340) -- Can't build for node-webkit [\#335](https://github.com/nodegit/nodegit/issues/335) - -- Error when creating a new ssh key during credential handshake. [\#333](https://github.com/nodegit/nodegit/issues/333) - - Tracking down bugs [\#331](https://github.com/nodegit/nodegit/issues/331) - Document possible values of CloneOptions [\#330](https://github.com/nodegit/nodegit/issues/330) @@ -250,10 +414,6 @@ - Fetch doesn't seem to work with https urls. [\#322](https://github.com/nodegit/nodegit/issues/322) -- `git diff --cached --name-only` [\#183](https://github.com/nodegit/nodegit/issues/183) - -- git status [\#170](https://github.com/nodegit/nodegit/issues/170) - **Merged pull requests:** - Refactor installation and publication [\#359](https://github.com/nodegit/nodegit/pull/359) ([maxkorp](https://github.com/maxkorp)) @@ -314,8 +474,6 @@ - current branch [\#305](https://github.com/nodegit/nodegit/issues/305) -- Don't require json output for production [\#302](https://github.com/nodegit/nodegit/issues/302) - - Module fails to load [\#299](https://github.com/nodegit/nodegit/issues/299) - How to list all tags? [\#298](https://github.com/nodegit/nodegit/issues/298) @@ -324,10 +482,6 @@ - Next release checklist [\#256](https://github.com/nodegit/nodegit/issues/256) -- CI issues [\#202](https://github.com/nodegit/nodegit/issues/202) - -- Variable names in the Docs? [\#157](https://github.com/nodegit/nodegit/issues/157) - **Merged pull requests:** - Fixed fetch to be async and use callbacks [\#319](https://github.com/nodegit/nodegit/pull/319) ([johnhaley81](https://github.com/johnhaley81)) @@ -400,8 +554,6 @@ - require\('path'\).Repo.open\(...\) returns {} [\#241](https://github.com/nodegit/nodegit/issues/241) -- Refactoring how internal C objects are stored in V8 and passed to JS [\#240](https://github.com/nodegit/nodegit/issues/240) - - RevWalk malloc error [\#239](https://github.com/nodegit/nodegit/issues/239) - OS X tests in Travis-CI [\#237](https://github.com/nodegit/nodegit/issues/237) @@ -420,24 +572,12 @@ - Did getReferences dissapear? [\#223](https://github.com/nodegit/nodegit/issues/223) -- How to get UNIX file attributes? [\#222](https://github.com/nodegit/nodegit/issues/222) - -- How to get mtime for TreeEntry/file? [\#221](https://github.com/nodegit/nodegit/issues/221) - -- Commit only if there is changes [\#219](https://github.com/nodegit/nodegit/issues/219) - - Again for \#147 [\#218](https://github.com/nodegit/nodegit/issues/218) - Update documentation on nodegit.org [\#217](https://github.com/nodegit/nodegit/issues/217) -- Can you provide the prebuilt binaries on S3? [\#216](https://github.com/nodegit/nodegit/issues/216) - - Stable = bump to 1.0 [\#215](https://github.com/nodegit/nodegit/issues/215) -- How can I push a commit? [\#214](https://github.com/nodegit/nodegit/issues/214) - -- "Error: Reference 'refs/heads/master' not found " when create commit in a empty repo [\#213](https://github.com/nodegit/nodegit/issues/213) - - Example on nodegit.com homepage is invalid [\#211](https://github.com/nodegit/nodegit/issues/211) - tree.diffWorkDir deprecated? [\#209](https://github.com/nodegit/nodegit/issues/209) @@ -454,76 +594,18 @@ - CloneOptions documentation lacking [\#192](https://github.com/nodegit/nodegit/issues/192) -- Getting the HEAD commit SHA [\#191](https://github.com/nodegit/nodegit/issues/191) - - Webpage examples are not up to date [\#190](https://github.com/nodegit/nodegit/issues/190) - Automatically generate structs from types array [\#187](https://github.com/nodegit/nodegit/issues/187) -- Adding a new file always returns the same SHA. [\#185](https://github.com/nodegit/nodegit/issues/185) - -- Current Travis passes with fallback binary. [\#182](https://github.com/nodegit/nodegit/issues/182) - - Error: connect ETIMEDOUT during install [\#179](https://github.com/nodegit/nodegit/issues/179) - TODO [\#177](https://github.com/nodegit/nodegit/issues/177) - Notes [\#176](https://github.com/nodegit/nodegit/issues/176) -- How to create a branch [\#174](https://github.com/nodegit/nodegit/issues/174) - -- `p-\>index\_map.data' failed [\#172](https://github.com/nodegit/nodegit/issues/172) - - Integration improvements. [\#171](https://github.com/nodegit/nodegit/issues/171) -- invalid ELF header from build/Release/nodegit.node [\#167](https://github.com/nodegit/nodegit/issues/167) - -- Removing generated source. [\#165](https://github.com/nodegit/nodegit/issues/165) - -- using newer libgit2 version [\#164](https://github.com/nodegit/nodegit/issues/164) - -- Generating tests for bindings. [\#163](https://github.com/nodegit/nodegit/issues/163) - -- Streams? [\#161](https://github.com/nodegit/nodegit/issues/161) - -- Unfortunately GitHub decided to go their own way :-/ [\#160](https://github.com/nodegit/nodegit/issues/160) - -- Separate additional meta data from JSON. [\#152](https://github.com/nodegit/nodegit/issues/152) - -- Git Pull [\#151](https://github.com/nodegit/nodegit/issues/151) - -- branch.cc missing from binding.gyp [\#149](https://github.com/nodegit/nodegit/issues/149) - -- numDeltasOfType is a static method not on the prototype [\#148](https://github.com/nodegit/nodegit/issues/148) - -- Not sure how this happen [\#147](https://github.com/nodegit/nodegit/issues/147) - -- Emscripten binding templates. [\#142](https://github.com/nodegit/nodegit/issues/142) - -- git+ssh transport support [\#136](https://github.com/nodegit/nodegit/issues/136) - -- Support for git\_merge [\#133](https://github.com/nodegit/nodegit/issues/133) - -- Random segfault in kh\_get\_off [\#132](https://github.com/nodegit/nodegit/issues/132) - -- Unexpected HTTP status code: 401 [\#130](https://github.com/nodegit/nodegit/issues/130) - -- Commit\#messageEncoding triggers a segmentation fault [\#129](https://github.com/nodegit/nodegit/issues/129) - -- Passing CloneOptions [\#127](https://github.com/nodegit/nodegit/issues/127) - -- Commit.getDiff\(\) fails for first commit [\#125](https://github.com/nodegit/nodegit/issues/125) - -- Adding directories [\#121](https://github.com/nodegit/nodegit/issues/121) - -- checkout head and update working tree [\#114](https://github.com/nodegit/nodegit/issues/114) - -- Index add cacheinfo [\#111](https://github.com/nodegit/nodegit/issues/111) - -- Remote.prototype.pushUrl\(\) Segmentation fault: 11 and Remote.prototype.setPushUrl\(url\) not working ? [\#109](https://github.com/nodegit/nodegit/issues/109) - -- Set working tree [\#93](https://github.com/nodegit/nodegit/issues/93) - **Merged pull requests:** - add history.md and update readme [\#291](https://github.com/nodegit/nodegit/pull/291) ([maxkorp](https://github.com/maxkorp)) @@ -660,10 +742,6 @@ - \[Experimental\] Emscripten fun. [\#168](https://github.com/nodegit/nodegit/pull/168) ([tbranyen](https://github.com/tbranyen)) -- \[WIP\] Descriptor refactor. [\#162](https://github.com/nodegit/nodegit/pull/162) ([tbranyen](https://github.com/tbranyen)) - -- Enable promises. [\#153](https://github.com/nodegit/nodegit/pull/153) ([tbranyen](https://github.com/tbranyen)) - ## [v0.1.4](https://github.com/nodegit/nodegit/tree/v0.1.4) (2014-06-13) [Full Changelog](https://github.com/nodegit/nodegit/compare/v0.1.3...v0.1.4) @@ -674,14 +752,10 @@ - using "Branch" object results in "undefined" error =\> branch.cc missing from binding.gyp? [\#166](https://github.com/nodegit/nodegit/issues/166) -- Feature: Compatibility with node \>=v0.11.13 [\#159](https://github.com/nodegit/nodegit/issues/159) - - Windows: Failure on install [\#158](https://github.com/nodegit/nodegit/issues/158) - Can't install v0.1.2 under OSX [\#155](https://github.com/nodegit/nodegit/issues/155) -- Logo for project [\#69](https://github.com/nodegit/nodegit/issues/69) - **Merged pull requests:** - \[WIP\] Prebuilt binaries. [\#178](https://github.com/nodegit/nodegit/pull/178) ([tbranyen](https://github.com/tbranyen)) @@ -694,10 +768,6 @@ [Full Changelog](https://github.com/nodegit/nodegit/compare/v0.1.2...v0.1.3) -**Closed issues:** - -- Fix AppVeyor. [\#154](https://github.com/nodegit/nodegit/issues/154) - **Merged pull requests:** - Fix erroneous OS detection for installation in OS X. [\#156](https://github.com/nodegit/nodegit/pull/156) ([tbranyen](https://github.com/tbranyen)) @@ -782,8 +852,6 @@ - missing cstring [\#88](https://github.com/nodegit/nodegit/issues/88) -- Memory management for the codegen `wip` branch [\#84](https://github.com/nodegit/nodegit/issues/84) - - Installing fails - can't find vendor/libgit2/build [\#80](https://github.com/nodegit/nodegit/issues/80) - Improving JavaScript API [\#73](https://github.com/nodegit/nodegit/issues/73) @@ -842,24 +910,14 @@ - Nested walks scatter memory and cause SEGFAULTS [\#72](https://github.com/nodegit/nodegit/issues/72) -- Why is new git.Oid\(\).fromString\(\) etc. async? [\#68](https://github.com/nodegit/nodegit/issues/68) - - feature request: Provide fileMode / getType method on tree entries [\#67](https://github.com/nodegit/nodegit/issues/67) - Document DiffList [\#66](https://github.com/nodegit/nodegit/issues/66) -- Implement query-like access to repo content [\#61](https://github.com/nodegit/nodegit/issues/61) - -- Tags [\#58](https://github.com/nodegit/nodegit/issues/58) - - Procedure for moving development to nodegit/nodegit [\#55](https://github.com/nodegit/nodegit/issues/55) -- cloning or updating repositories? [\#50](https://github.com/nodegit/nodegit/issues/50) - - Cannot install on OSX [\#49](https://github.com/nodegit/nodegit/issues/49) -- Add file to repo [\#45](https://github.com/nodegit/nodegit/issues/45) - **Merged pull requests:** - Fixed TreeBuilder.write's missing repo argument to match its documentation [\#85](https://github.com/nodegit/nodegit/pull/85) ([FrozenCow](https://github.com/FrozenCow)) @@ -878,12 +936,8 @@ **Closed issues:** -- Un-chain async example on github pages [\#65](https://github.com/nodegit/nodegit/issues/65) - - Clarify commit.history documentation [\#63](https://github.com/nodegit/nodegit/issues/63) -- Make commit.time pass Date object [\#62](https://github.com/nodegit/nodegit/issues/62) - - Python error on installing nodegit 0.0.77 [\#59](https://github.com/nodegit/nodegit/issues/59) ## [v0.0.778](https://github.com/nodegit/nodegit/tree/v0.0.778) (2013-03-26) @@ -968,8 +1022,6 @@ - update for node 0.5.9 [\#29](https://github.com/nodegit/nodegit/issues/29) -- Issue with errors [\#23](https://github.com/nodegit/nodegit/issues/23) - **Merged pull requests:** - Converted from eio\_custom to uv\_queue\_work [\#48](https://github.com/nodegit/nodegit/pull/48) ([faceleg](https://github.com/faceleg)) @@ -1018,10 +1070,6 @@ - example/convenience-repo.js errors [\#21](https://github.com/nodegit/nodegit/issues/21) -- Use new Error when throwing exceptions [\#20](https://github.com/nodegit/nodegit/issues/20) - -- Scope.close when handlescope is used [\#19](https://github.com/nodegit/nodegit/issues/19) - - Branch history each method is asynchronous [\#11](https://github.com/nodegit/nodegit/issues/11) ## [v0.0.3](https://github.com/nodegit/nodegit/tree/v0.0.3) (2011-04-13) @@ -1032,10 +1080,6 @@ - error handling [\#18](https://github.com/nodegit/nodegit/issues/18) -- nodegit namespace [\#14](https://github.com/nodegit/nodegit/issues/14) - -- Rename all classes to have Git prefix [\#13](https://github.com/nodegit/nodegit/issues/13) - - Windows link issue [\#12](https://github.com/nodegit/nodegit/issues/12) ## [v0.0.2](https://github.com/nodegit/nodegit/tree/v0.0.2) (2011-03-14) From 5f6632088c0210ae38a1ad2c365ca490da8d7d02 Mon Sep 17 00:00:00 2001 From: Tim Branyen Date: Thu, 7 May 2015 16:04:55 -0400 Subject: [PATCH 60/60] Update changelog to reflect 0.4.0 version --- CHANGELOG.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 2b0f8e094..a9734feb9 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,8 +1,8 @@ # Change Log -## [Unreleased](https://github.com/nodegit/nodegit/tree/HEAD) +## [v0.4.0](https://github.com/nodegit/nodegit/tree/v0.4.0) (2015-05-07) -[Full Changelog](https://github.com/nodegit/nodegit/compare/v0.3.3...HEAD) +[Full Changelog](https://github.com/nodegit/nodegit/compare/v0.3.3...v0.4.0) **Closed issues:** @@ -1090,4 +1090,4 @@ -\* *This Change Log was automatically generated by [github_changelog_generator](https://github.com/skywinder/Github-Changelog-Generator)* \ No newline at end of file +\* *This Change Log was automatically generated by [github_changelog_generator](https://github.com/skywinder/Github-Changelog-Generator)*