-
Notifications
You must be signed in to change notification settings - Fork 1
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
How to add an option for custom contents of file. #6
Comments
This is an example used in var toReadStream = require('spawn-to-readstream'),
spawn = require('child_process').spawn;
/**
* Get what revision and author last modified each line of a file
* @param {vinyl} file `vinyl` file (https://github.com/gulpjs/vinyl)
*/
function blame (file) {
var args = ['blame', '-l', '-t', '-w', '-C', '-M'];
if (file.contents) {
args.push('--contents');
args.push('-');
}
args.push('--');
args.push(file.path);
var blame = spawn('git', args, {
cwd: file.cwd
});
if (file.isBuffer()) {
blame.stdin.write(file.contents);
blame.stdin.end();
} else if (file.isStream()) {
file.contents.pipe(blame.stdin);
}
return toReadStream(blame);
} |
Hi @gucong3000 , not sure I understand. This module parses the output of the As for getting the corrects results after modifying a document (the issue opened in |
I see. This should be handled in |
|
That's outside of the scope of this module in my opinion. |
Only need a little change, can I push a PR to demonstrate my intention? |
Ok |
I understand. Thank you for the pull requests. I'll take a look over them when I have some time. Also, please leave the linting as it is and don't add |
I'm planning to use ' git-blame' instead of my js file, but I need to customize contents of file.
The text was updated successfully, but these errors were encountered: