Skip to content

Commit

Permalink
Adds logging for waiting git calls
Browse files Browse the repository at this point in the history
  • Loading branch information
eamodio committed Nov 25, 2020
1 parent c6080d1 commit 846bc6e
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/git/git.ts
Original file line number Diff line number Diff line change
Expand Up @@ -132,6 +132,7 @@ export async function git<TOut extends string | Buffer>(options: GitCommandOptio
pendingCommands.set(command, promise);
} else {
waiting = true;
Logger.debug(`${gitCommand} ${GlyphChars.Dot} waiting...`);
}

let exception: Error | undefined;
Expand All @@ -157,7 +158,7 @@ export async function git<TOut extends string | Buffer>(options: GitCommandOptio
} finally {
pendingCommands.delete(command);

const duration = `${Strings.getDurationMilliseconds(start)} ms ${waiting ? '(await) ' : emptyStr}`;
const duration = `${Strings.getDurationMilliseconds(start)} ms ${waiting ? '(waited) ' : emptyStr}`;
if (exception !== undefined) {
Logger.warn(
`[${runOpts.cwd}] Git ${(exception.message || exception.toString() || emptyStr)
Expand Down

0 comments on commit 846bc6e

Please sign in to comment.