git-js
git-js copied to clipboard
Add global / task level option for streaming stdout/stderr from child process
trafficstars
V2 allows effective streaming of the git binary's output using the setOutputHandler method, this enhancement would add a new option for streaming each task independently as an emitter.
const git = simpleGit();
const statusResult = await git.status();
// effectively the same as using setOutputHandler, receives progress from all tasks
git.on('progress', (task, stdOut, stdErr) => {});
// receives only those progress events from the status task
statusResult.on('progress', (task, stdOut, stdErr) => {});
v3 edition Is there any way to monitor the download progress?
@steveukx Seconding @xiaoxian521's request -- it'd be great if this could be used to show progress of git clone, e.g. with a percentage. To that end, it'd also be necessary to know the total bytes expected to be downloaded. Would you consider adding such a feature? (If there isn't one already, that is :smile:)