Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Is a callback required for 0.17.1? #51

Closed
iamwilhelm opened this issue Jun 22, 2013 · 3 comments
Closed

Is a callback required for 0.17.1? #51

iamwilhelm opened this issue Jun 22, 2013 · 3 comments

Comments

@iamwilhelm
Copy link
Contributor

Older versions of gitteh had an optional callback, like for openRepository().

However, just installing gitteh 0.17.1 on node 0.8.25, it seems like openRepository() now requires a callback:

coffee> repo = gitteh.openRepository("path/to/repo.git")
Error: Not enough arguments.
    at module.exports.fn (/Users/iamwil/projects/code/cubehero/node_modules/gitteh/lib/args.js:53:13)
    at Object.Gitteh.openRepository (/Users/iamwil/projects/code/cubehero/node_modules/gitteh/lib/gitteh.js:898:12)
    at evalmachine.<anonymous>:3:20
    at Object.exports.eval (/Users/iamwil/.nvm/v0.8.25/lib/node_modules/coffee-script/lib/coffee-script/coffee-script.js:146:17)
    at Interface.run (/Users/iamwil/.nvm/v0.8.25/lib/node_modules/coffee-script/lib/coffee-script/repl.js:145:41)
    at Interface.EventEmitter.emit (events.js:96:17)
    at Interface._onLine (readline.js:200:10)
    at Interface._line (readline.js:518:8)
    at Interface._ttyWrite (readline.js:736:14)
    at ReadStream.onkeypress (readline.js:97:10)

However, the documentation doesn't reflect this requirement. I'm wondering, is this a bug, or is the documentation now incorrect?

@samcday
Copy link
Contributor

samcday commented Jun 22, 2013

@iamwilhelm Documentation is now fairly out of date, a new version of it will be coming soonish.

To answer you question though - callbacks are now mandatory, as the blocking (sync) code has been entirely removed from the bindings to reduce complexity. gitteh is now entirely asynchronous.

@samcday
Copy link
Contributor

samcday commented Jun 22, 2013

I've created #53 as a result of this issue. Closing this one as it's answered!

@samcday samcday closed this as completed Jun 22, 2013
@iamwilhelm
Copy link
Contributor Author

Alright! Glad to see that the npm package compiles and you're still making headway. Thanks for maintaining!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants