Skip to content

Instantly share code, notes, and snippets.

@johnhaley81
Created February 5, 2015 18:22
Show Gist options
  • Save johnhaley81/c751e9af687224e61e91 to your computer and use it in GitHub Desktop.
Save johnhaley81/c751e9af687224e61e91 to your computer and use it in GitHub Desktop.
Status errors on "untracked" branch
johnhosx :: ~/Development/nodegit ‹untracked*› » npm test
> [email protected] test /Users/johnh/Development/nodegit
> npm run lint && npm run cov
> [email protected] lint /Users/johnh/Development/nodegit
> jshint lib test/tests examples lifecycleScripts
> [email protected] cov /Users/johnh/Development/nodegit
> node test
Attr
✓ can add a macro definition
✓ can flush the attr cache
✓ can lookup the value of a git attribute
Blob
✓ can provide content as a buffer
✓ can provide content as a string
✓ can determine if a blob is not a binary
✓ can get a blob with an Oid object
Branch
✓ can create a branch
✓ can delete a branch
✓ can see if the branch is pointed to by head
Checkout
✓ can checkout the head
Clone
✓ can clone with http (2991ms)
✓ can clone with https (2713ms)
✓ can clone with ssh (8912ms)
✓ can clone with ssh while manually loading a key (9850ms)
✓ can clone with git (2295ms)
✓ can clone with filesystem
Commit
✓ will fail with an invalid sha
✓ has a message
✓ has a raw message
✓ has a message encoding
✓ has a summary
✓ has a sha
✓ has a time
✓ has a date
✓ has a time offset
✓ can create a commit
✓ has owner
✓ can walk its repository's history (82ms)
✓ can fetch the master branch HEAD
✓ can fetch all its parents
✓ can specify a parents limit
✓ can specify limit higher than actual parents
✓ can fetch parents of a merge commit
✓ has a parent count
✓ can retrieve and walk a commit tree
✓ can get the commit diff
author
✓ is available
✓ has a name
✓ has an email
committer
✓ is available
✓ has a name
✓ has an email
Cred
✓ can create default credentials
✓ can create ssh credentials using passed keys
✓ can create credentials using plaintext
Diff
✓ can walk a DiffList
✓ can diff the workdir with index
✓ can diff with a null tree (51ms)
✓ can diff the initial commit of a repository
Index
✓ can get the index of a repo and examine entries
Merge
✓ can cleanly merge 2 files (65ms)
✓ can fast-forward using the convenience method (57ms)
✓ can merge cleanly using the convenience method (55ms)
✓ can merge 2 branchs with conflicts on a single file
Odb
✓ can read raw objects directly from the odb using an OID
✓ can read objects directly from the odb using a string
✓ can write raw objects to git
Oid
✓ can convert a string to an oid
✓ can convert an oid to a string
✓ provides a custom inspect method to improve debugging
Reference
✓ can look up a reference
✓ can determine if the reference is symbolic
✓ will return undefined looking up the symbolic target if not symbolic
✓ can look up the HEAD sha
Remote
✓ can load a remote
✓ can read the remote url
✓ can push a remote
✓ can set a remote
✓ can read the remote name
✓ can create a new remote
✓ can delete a remote
✓ can download from a remote (213ms)
✓ can fetch from a remote (300ms)
✓ can fetch from all remotes (4044ms)
Repository
✓ can open a valid repository
✓ cannot open an invalid repository
✓ does not try to open paths that don't exist
✓ can initialize a repository into a folder
✓ can utilize repository init options
✓ can read the index
✓ can list remotes
Fixed callbacks to be null unless set in structs
✓ can get the current branch
✓ can get the default signature
1) gets statuses with StatusFile
Revwalk
✓ can create a walker
✓ can push an object
✓ can hide an object
✓ can simplify to first parent
✓ can get a specified number of commits
✓ can get commits until you tell it not to
- doesnt segfault when accessing .author() twice
Signature
✓ can be created at an arbitrary time
✓ can be created now
Status
2) gets no statuses on clean working directory
3) gets a status on changing file directory
4) gets status with options
StatusFile
✓ passes the path to the working function
✓ identifies the proper statuses
Tag
✓ can get a tag from a repo via the tag name
✓ can get a tag from a repo via the long tag name
✓ can get a tag from a repo via the tag's OID as a string
✓ can get a tag from a repo via the tag's OID object
✓ can list tags in a repo
TreeEntry
✓ will fail on a missing file
✓ provides the correct sha for a file
✓ provides the filename
✓ provides the blob representation of the entry
✓ provides the tree the entry is part of
✓ can determine if an entry is a file
✓ can determine if an entry is a directory
106 passing (35s)
1 pending
4 failing
1) Repository gets statuses with StatusFile:
AssertionError: 2 == 1
at /Users/johnh/Development/nodegit/test/tests/repository.js:88:18
at /Users/johnh/Development/nodegit/node_modules/nodegit-promise/lib/core.js:64:15
at flush (/Users/johnh/Development/nodegit/node_modules/nodegit-promise/node_modules/asap/asap.js:27:13)
at process._tickCallback (node.js:442:13)
2) Status gets no statuses on clean working directory:
AssertionError: 2 == 0
at /Users/johnh/Development/nodegit/test/tests/status.js:26:14
at /Users/johnh/Development/nodegit/node_modules/nodegit-promise/lib/core.js:64:15
at flush (/Users/johnh/Development/nodegit/node_modules/nodegit-promise/node_modules/asap/asap.js:27:13)
at process._tickCallback (node.js:442:13)
3) Status gets a status on changing file directory:
AssertionError: 3 == 1
at /Users/johnh/Development/nodegit/test/tests/status.js:46:20
at /Users/johnh/Development/nodegit/node_modules/nodegit-promise/lib/core.js:64:15
at flush (/Users/johnh/Development/nodegit/node_modules/nodegit-promise/node_modules/asap/asap.js:27:13)
at process._tickCallback (node.js:442:13)
4) Status gets status with options:
AssertionError: 3 == 1
at /Users/johnh/Development/nodegit/test/tests/status.js:74:18
at /Users/johnh/Development/nodegit/node_modules/nodegit-promise/lib/core.js:64:15
at flush (/Users/johnh/Development/nodegit/node_modules/nodegit-promise/node_modules/asap/asap.js:27:13)
at process._tickCallback (node.js:442:13)
=============================================================================
Writing coverage object [/Users/johnh/Development/nodegit/test/coverage/coverage.json]
Writing coverage reports at [/Users/johnh/Development/nodegit/test/coverage]
=============================================================================
=============================== Coverage summary ===============================
Statements : 100% ( 19/19 )
Branches : 100% ( 0/0 )
Functions : 100% ( 8/8 )
Lines : 100% ( 19/19 )
================================================================================
npm ERR! Darwin 14.1.0
npm ERR! argv "node" "/Users/johnh/Development/nodegit/node_modules/.bin/npm" "run" "cov"
npm ERR! node v0.10.36
npm ERR! npm v2.4.1
npm ERR! code ELIFECYCLE
npm ERR! [email protected] cov: `node test`
npm ERR! Exit status 4
npm ERR!
npm ERR! Failed at the [email protected] cov script 'node test'.
npm ERR! This is most likely a problem with the nodegit package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! node test
npm ERR! You can get their info via:
npm ERR! npm owner ls nodegit
npm ERR! There is likely additional logging output above.
npm ERR! Please include the following file with any support request:
npm ERR! /Users/johnh/Development/nodegit/npm-debug.log
npm ERR! Test failed. See above for more details.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment