Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
Git.prototype.log = function (options, then) {
var handler = Git.trailingFunctionArgument(arguments);
var opt = (handler === then ? options : null) || {};
var splitter = opt.splitter || ';';
var format = opt.format || {
hash: '%H',
date: '%ai',
message: '%s%d',
author_name: '%aN',
author_email: '%ae'
};
var fields = Object.keys(format);
var formatstr = fields.map(function(k) { return format[k]; }).join(splitter);
var command = ["log", "--all", "--pretty=format:" + formatstr];
if (Array.isArray(opt)) {
command = command.concat(opt);