Use spawn instead of exec.
This way it's not subject to stdout maxBuffer restrictions that come with exec.
Fixes issue #6
Line https://github.com/pvorb/node-git-wrapper/pull/7/files#diff-bff8ce0d1a86c39ee4d6995bd85b746fR86 fails with commands like git -C ./path status, fixed here https://github.com/adelriosantiago/node-git-wrapper/blob/master/git.js#L87
Other than that, everything seems to work fine, spawn works fine and the 200k limit is gone.
@adelriosantiago - On your line 87, I worry you may have accidentally put the new command outside the existing else if block because there are no curly brackets around it.
What I mean is, what you have here:
else if (val !== false)
args.push('-'+k);
args.push(val);
Probably meant to be:
else if (val !== false) {
args.push('-'+k);
args.push(val);
}
.. Could also keep it single line because .push can accept multiple elements:
args.push('-'+k, val);
It used to be a single-line else if block so the curlies weren't necessary before.
Disclaimer: I've not tested this and this P/R is about a year old so I'm coming back in with a hazy memory :)