mirror of
https://github.com/microsoft/vscode.git
synced 2026-04-28 04:23:32 +01:00
Add timestamp and execution time to Git log
This commit is contained in:
@@ -531,10 +531,15 @@ export class Git {
|
||||
child.stdin!.end(options.input, 'utf8');
|
||||
}
|
||||
|
||||
const startTime = Date.now();
|
||||
const bufferResult = await exec(child, options.cancellationToken);
|
||||
|
||||
if (options.log !== false && bufferResult.stderr.length > 0) {
|
||||
this.log(`${bufferResult.stderr}\n`);
|
||||
if (options.log !== false) {
|
||||
this.log(`> git ${args.join(' ')} [${Date.now() - startTime}ms]\n`);
|
||||
|
||||
if (bufferResult.stderr.length > 0) {
|
||||
this.log(`${bufferResult.stderr}\n`);
|
||||
}
|
||||
}
|
||||
|
||||
let encoding = options.encoding || 'utf8';
|
||||
@@ -585,10 +590,6 @@ export class Git {
|
||||
options.cwd = sanitizePath(options.cwd);
|
||||
}
|
||||
|
||||
if (options.log !== false) {
|
||||
this.log(`> git ${args.join(' ')}\n`);
|
||||
}
|
||||
|
||||
return cp.spawn(this.path, args, options);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user